home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / usenet / sources / volume89 / librarys / mklib.1 < prev    next >
Text File  |  1989-02-01  |  78KB  |  2,009 lines

  1. Path: xanth!ames!mailrus!ulowell!page
  2. From: page@swan.ulowell.edu (Bob Page)
  3. Newsgroups: comp.sources.amiga
  4. Subject: v89i006:  mklib - make a .library file out of .c files
  5. Message-ID: <11496@swan.ulowell.edu>
  6. Date: 1 Feb 89 05:01:05 GMT
  7. Organization: University of Lowell, Computer Science Dept.
  8. Lines: 1998
  9. Approved: page@swan.ulowell.edu
  10.  
  11. Submitted-by: hcr!hcrvax!edwin (Edwin Hoogerbeets)
  12. Posting-number: Volume 89, Issue 6
  13. Archive-name: libraries/mklib.1
  14.  
  15. I wanted to write my routines in C and not fiddle with the
  16. assembler interface, etc.  I decided to write mklib and keep my
  17. fiddling with the assembler to this one session.
  18.  
  19. [uuencoded executable included.  ..Bob]
  20.  
  21. #    This is a shell archive.
  22. #    Remove everything above and including the cut line.
  23. #    Then run the rest of the file through sh.
  24. #----cut here-----cut here-----cut here-----cut here----#
  25. #!/bin/sh
  26. # shar:    Shell Archiver
  27. #    Run the following text with /bin/sh to create:
  28. #    ed.c
  29. #    makefile
  30. #    mklib.c
  31. #    mklib.h
  32. #    mklib.man
  33. #    mklib.uu
  34. #    readme
  35. #    t.c
  36. #    text.c
  37. # This archive created: Mon Jan 30 17:11:16 1989
  38. cat << \SHAR_EOF > ed.c
  39. /* this is a test library */
  40. #include <exec/types.h>
  41.  
  42. char myname[] = "mylib.library";
  43. char myid[] = "mylib 1.0 (23 Oct 1986)\r\n";
  44.  
  45. LONG GetDown()
  46. {
  47.         return (77);
  48. }
  49.  
  50. ULONG Double(arg)
  51. ULONG arg;
  52. {
  53.         return (2 * arg);
  54. }
  55.  
  56. LONG Triple(arg)
  57. LONG arg;
  58. {
  59.     arg *= 3;
  60.  
  61.     return ((LONG)arg);
  62. }
  63.  
  64. LONG Add(apples,oranges)
  65. LONG apples,oranges;
  66. {
  67.     return(apples+oranges);
  68. }
  69.  
  70. LONG Sum(a,b,c,d,e,f)
  71. LONG a,b,c,d,e,f;
  72. {
  73.     return(a+b+c+d+e+f);
  74. }
  75.  
  76. SHAR_EOF
  77. cat << \SHAR_EOF > makefile
  78. # Mklib 1.0 - a source file generator for Amiga shared libraries
  79. # copyright 1988 Edwin Hoogerbeets
  80. #
  81. # This software is freely redistributable as long as there is no charge
  82. # beyond resonable copy fees and as long as this notice stays intact.
  83. #
  84. # Thanks to Jimm Mackraz for Elib on Fish 87, from which much of this
  85. # program is lifted. Also thanks to Neil Katin for his mylib.asm upon
  86. # which elib is based.
  87.  
  88. CFLAGS=-Z20000
  89. OBJS=mklib.o text.o
  90.  
  91. mklib: $(OBJS)
  92.         ln $(OBJS) -led -lc -o mklib
  93. SHAR_EOF
  94. cat << \SHAR_EOF > mklib.c
  95. /*
  96.     Mklib 1.0 - a source file generator for Amiga shared libraries
  97.     Compiled with Manx v3.6a small code model/16 bit int. (see makefile)
  98.  
  99.     copyright 1988 Edwin Hoogerbeets
  100.  
  101.     This software and the files it produces are freely redistributable
  102.     as long there is no charge beyond reasonable copy fees and as long
  103.     as this notice stays intact.
  104.  
  105.     Thanks to Jimm Mackraz for Elib on Fish 87, from which much of this
  106.     program is lifted. Also thanks to Neil Katin for his mylib.asm upon
  107.     which elib is based.
  108. */
  109. #include <stdio.h>
  110. #include <ctype.h>
  111. #include <edlib.h>
  112. #include "mklib.h"
  113.  
  114. void error(msg)
  115. char *msg;
  116. {
  117.     fprintf(stderr,"Error: %s\n",msg);
  118.     exit(1);
  119. }
  120.  
  121. void writeto(file,header)
  122. FILE *file;
  123. char *header[];
  124. {
  125.     int index = 0;
  126.  
  127.     while ( header[index] != NULL  )
  128.         fprintf(file,"%s\n",header[index++]);
  129. }
  130.  
  131. /* init opens and initializes all the output files */
  132. void init()
  133. {
  134.     /* open file with startup code */
  135.     if ( (startup = fopen("startup.asm","w")) == NULL )
  136.         error("Could not open startup code file");
  137.  
  138.     /* write the header and the body to the file */
  139.     writeto(startup,asmheader);
  140.     writeto(startup,startupcode);
  141.  
  142.     /* we are finished with the startup code file */
  143.     fclose(startup);
  144.  
  145.     /* open romtag file */
  146.     if ( (romtag = fopen("rtag.asm","w")) == NULL )
  147.         error("Could not open romtag file");
  148.  
  149.     /* write the header and the romtag info */
  150.     writeto(romtag,asmheader);
  151.     writeto(romtag,rtag);
  152.  
  153.     /* we are finished with this one too */
  154.     fclose(romtag);
  155.  
  156.  
  157.     /* open library include file */
  158.     if ( (inc = fopen("lib.h","w")) == NULL )
  159.         error("Could not open library include file");
  160.  
  161.     /* write the header and the info */
  162.     writeto(inc,cheader);
  163.     writeto(inc,incbody);
  164.  
  165.     /* we are finished with this one too */
  166.     fclose(inc);
  167.  
  168.     /* open the interface, link and make file for processing and add in
  169.        the appropriate header info */
  170.  
  171.     /* open library file */
  172.     if ( (lib = fopen("lib.c","w")) == NULL )
  173.         error("Could not open library main file");
  174.  
  175.     /* write the header */
  176.     writeto(lib,cheader);
  177.  
  178.     /* open link header file */
  179.     if ( (linkh = fopen("link.h","w")) == NULL )
  180.         error("Could not open link header main file");
  181.  
  182.     /* write the header */
  183.     writeto(linkh,cheader);
  184.  
  185.     /* open library interface file */
  186.     if ( (interface = fopen("interface.asm","w")) == NULL )
  187.         error("Could not open library interface file");
  188.  
  189.     /* write the header */
  190.     writeto(interface,asmheader);
  191.     writeto(interface,faceheader);
  192.  
  193.     /* open library linker file */
  194.     if ( (link = fopen("link.asm","w")) == NULL )
  195.         error("Could not open library linker file");
  196.  
  197.     /* write the header */
  198.     writeto(link,asmheader);
  199.     writeto(link,linkhead);
  200.  
  201.     /* open makefile */
  202.     if ( (makefile = fopen("makefile","w")) == NULL )
  203.         error("Could not open makefile");
  204.  
  205.     /* write the header */
  206.     writeto(makefile,makeheader);
  207.  
  208.     return();
  209. }
  210.  
  211.  
  212. /* rudimentary scanner for picking up tokens to be parsed for function
  213.    declarations */
  214. int getoken(file)
  215. char *file;
  216. {
  217.     char c;
  218.     short cont = 1, eoc = 0;    /* continue loop and end of comment flags */
  219.  
  220.     while ( isspace(c = getc(file)) );
  221.  
  222.     if ( c == EOF )
  223.         return(NOTHING);
  224.  
  225.     /* if the character is escaped, then ignore it */
  226.     if ( c == '\\' ) {
  227.         getc(file);
  228.         return(OTHER);
  229.     }
  230.  
  231.     /* if the character is '/' and is followed by a '*', then you have
  232.        a comment which you can throw out until the end of comment
  233.        characters come along, example here ->*/
  234.  
  235.     if ( c == '/' ) {
  236.         if ( (c = getc(file)) == '*' ) {
  237.             /* get a comment */
  238.             while ( (c = getc(file)) != EOF && cont ) {
  239.                 if ( c == '/' && eoc ) {
  240.                     cont = 0;
  241.                 } else {
  242.                     eoc = 0;
  243.                 }
  244.                 if ( c == '*' )
  245.                     eoc = 1;
  246.             }
  247.             if ( c == EOF )
  248.                 return(NOTHING);
  249.         }
  250.         ungetc(c,file);
  251.         return(OTHER);
  252.     }
  253.  
  254.  
  255.     if ( iscsymf(c)  ) {
  256.  
  257.         tempc = 0;
  258.         tempfunc[tempc++] = c;
  259.  
  260.         /* to allow tokens like asdf.library, we must check for '.' too */
  261.         while ( iscsym(c = getc(file)) || c == '.' )
  262.             tempfunc[tempc++] = c;
  263.  
  264.         tempfunc[tempc] = '\0';
  265.         ungetc(c,file);
  266.  
  267.         if ( !strcmp("LONG",tempfunc) || !strcmp("ULONG",tempfunc) )
  268.             return(LONGT);
  269.  
  270.         if ( !strcmp("extern",tempfunc) )
  271.             return(EXT);
  272.  
  273.         if ( !strcmp("char",tempfunc) )
  274.             return(CHAR);
  275.  
  276.         if ( !strcmp("myname",tempfunc) )
  277.             return(MYNAME);
  278.  
  279.         if ( !strcmp("myid",tempfunc) )
  280.             return(MYID);
  281.  
  282.         return(IDENT);
  283.     }
  284.  
  285.     switch (c) {
  286.         case ',':
  287.             return(COMMA);
  288.         case ';':
  289.             return(SEMI);
  290.         case '{':
  291.             return(OBRACE);
  292.         case '}':
  293.             return(CBRACE);
  294.         case '(':
  295.             return(OBRACK);
  296.         case ')':
  297.             return(CBRACK);
  298.         case '*':
  299.             return(STAR);
  300.         case '\"':
  301.             return(QUOTE);
  302.         default:
  303.             return(OTHER);
  304.     }
  305. }
  306.  
  307. void addfunc(name,count)
  308. char *name;
  309. int count;
  310. {
  311.     if ( ftcounter < MAXFUNC ) {
  312.         strcpy(functable[ftcounter].name,name);
  313.         functable[ftcounter++].numofargs = count;
  314.     } else {
  315.         error("Out of function name table space. Recompile with bigger MAXFUNC");
  316.     }
  317. }
  318.  
  319. /* process reads the input files and generates the proper output in the
  320.    interface, link and makefiles */
  321. void process(file)
  322. char *file;
  323. {
  324.     FILE *in;               /* pointer to input file */
  325.     int leftcount = 0;      /* counter for number of { } to tell when a
  326.                                function starts */
  327.     int token, argcount;
  328.     char tempname[MAXLEN], str[MAXLEN];
  329.  
  330.     if ( (in = fopen(file,"r")) == NULL ) {
  331.         fprintf(stderr,"Could not open input file %s\n",file);
  332.         return();
  333.     }
  334.  
  335.     /* fill the function name table with the names of the functions in
  336.        the given file */
  337.     while ( (token = getoken(in)) != NOTHING ) {
  338.  
  339.         switch ( token ) {
  340.             /* extern definition... throw out everything to end of statement
  341.                which is denoted by a ; */
  342.             case EXT:
  343.                 while ( (token = getoken(in)) != SEMI && token != NOTHING ) ;
  344.                 break;
  345.  
  346.             /* (maybe) a definition of a function */
  347.             case LONGT:
  348.                 if ( !leftcount ) {
  349.                     if ( (token = getoken(in)) == IDENT ) {
  350.                         if ( (token = getoken(in)) == OBRACK ) {
  351.  
  352.                             argcount = 0;
  353.  
  354.                             /* save the function name from further
  355.                                thrashing by the scanner */
  356.  
  357.                             strcpy(tempname,tempfunc);
  358.  
  359.                             token = getoken(in);
  360.  
  361.                             while ( token != CBRACK ) {
  362.  
  363.                                 if ( token == IDENT ) {
  364.                                     ++argcount;
  365.                                 } else if ( token != COMMA ) {
  366.                                     sprintf(str,"Bad declaration syntax in\
  367.  file %s, function %s\n",file,tempname);
  368.                                     error(str);
  369.                                 }
  370.                                 token = getoken(in);
  371.                             }
  372.  
  373.                             /* if a semicolon follows then this is only a
  374.                                forward declaration and should not be added
  375.                                to the functions list. If anything else,
  376.                                then this is a definition. */
  377.                             if ( (token = getoken(in)) != SEMI ) {
  378.                                 addfunc(tempname,argcount);
  379.                             }
  380.  
  381.                         }
  382.                     }
  383.                 }
  384.                 break;
  385.  
  386.             /* entering a block */
  387.             case OBRACE:
  388.                 ++leftcount;
  389.                 break;
  390.  
  391.             /* exiting a block */
  392.             case CBRACE:
  393.                 if ( leftcount )
  394.                     --leftcount;
  395.                 break;
  396.  
  397.             case CHAR:
  398.                 /* possibly myname is defined */
  399.                 if ( !leftcount ) {
  400.  
  401.                     /* might be declared as char *myname = "foo.library" */
  402.                     if ( (token = getoken(in)) == STAR ) {
  403.  
  404.                         if ( (token = getoken(in)) == MYNAME &&
  405.                             !mynamedef ) {
  406.  
  407.                             token = getoken(in);   /* skip the = */
  408.  
  409.                             if ( (token = getoken(in)) == QUOTE) {
  410.                                 /* we have ignition! */
  411.  
  412.                                 if ( (token = getoken(in)) == IDENT ) {
  413.                                     /* we have liftoff! */
  414.  
  415.                                     strcpy(myname,tempfunc);
  416.                                     mynamedef = 1;
  417.  
  418.                                 }
  419.                             }
  420.                         } else if ( token == MYID && !myiddef ) {
  421.  
  422.                             token = getoken(in);   /* skip the = */
  423.  
  424.                             if ( (token = getoken(in)) == QUOTE) {
  425.                                 /* we have ignition! */
  426.  
  427.                                 if ( (token = getoken(in)) == IDENT ) {
  428.                                     /* we have liftoff! */
  429.  
  430.                                     strcpy(myid,tempfunc);
  431.                                     myiddef = 1;
  432.  
  433.                                 }
  434.                             }
  435.                         }
  436.  
  437.                     /* else declared as char myname[] = "foo.library" */
  438.                     } else if ( token == MYNAME && !mynamedef ) {
  439.  
  440.                         /* now skip the [, ] and = */
  441.                         token = getoken(in);
  442.                         token = getoken(in);
  443.                         token = getoken(in);
  444.  
  445.                         if ( (token = getoken(in)) == QUOTE) {
  446.                             /* we have ignition! */
  447.  
  448.                             if ( (token = getoken(in)) == IDENT ) {
  449.                                 /* we have liftoff! */
  450.  
  451.                                 strcpy(myname,tempfunc);
  452.                                 mynamedef = 1;
  453.  
  454.                             }
  455.                         }
  456.                     } else if ( token == MYID && !myiddef ) {
  457.  
  458.                         /* now skip the [, ] and = */
  459.                         token = getoken(in);
  460.                         token = getoken(in);
  461.                         token = getoken(in);
  462.  
  463.                         if ( (token = getoken(in)) == QUOTE) {
  464.                             /* we have ignition! */
  465.  
  466.                             if ( (token = getoken(in)) == IDENT ) {
  467.                                 /* we have liftoff! */
  468.  
  469.                                 strcpy(myid,tempfunc);
  470.                                 myiddef = 1;
  471.  
  472.                             }
  473.                         }
  474.                     }
  475.                 }
  476.                 break;
  477.  
  478.             default:
  479.                 break;
  480.         }
  481.     }
  482.  
  483.     fclose(in);
  484. }
  485.  
  486. /* converts a file name from a .c to a .o file */
  487. void to_dot_o(out,in)
  488. char *out,*in;
  489. {
  490.     int index = strrpos(in,'.');
  491.  
  492.     strcpy(out,in);
  493.  
  494.     /* if there is no '.' in the file name or if the letter after the '.'
  495.        is not 'c', then concatenate a ".o" to the end of the file name,
  496.        or else just change the 'c' to an 'o' */
  497.  
  498.     if ( index == -1 || in[index+1] != 'c' ) {
  499.         strcat(out,".o");
  500.     } else {
  501.         out[index+1] = 'o';
  502.     }
  503.  
  504.     return();
  505. }
  506.  
  507. /* shutdown cleans up and closes the output files */
  508. void shutdown(argc,argv)
  509. int argc;
  510. char **argv;
  511. {
  512.     int index, num;
  513.     char temp[MAXLEN];
  514.  
  515.     if ( !mynamedef ) {
  516.         strcpy(myname,"mylib.library");
  517.         printf("Myname variable not defined: using \"mylib.library\"\n");
  518.         fprintf(lib,"char myname[] = \"mylib.library\";\n");
  519.     }
  520.  
  521.     if ( !myiddef ) {
  522.         printf("Myid variable not defined: using \"mylib version 1.0\"\n");
  523.         fprintf(lib,"char myid[] = \"mylib version 1.0\";\n");
  524.     }
  525.  
  526.     fprintf(lib,"\n");
  527.     writeto(lib,mandatory);
  528.  
  529.     fprintf(linkh,"APTR libbase;\n\n");
  530.  
  531.     puts("The following LONG functions were found in your source:");
  532.     puts("#  : args name");
  533.     for ( index = 0 ; index < ftcounter ; index++  ) {
  534.         printf("%-3d: %d    %-30s\n",index,functable[index].numofargs,
  535.                functable[index].name);
  536.         fprintf(interface,"        dc.l    X%s\n",functable[index].name);
  537.         fprintf(link,"        LIBDEF _LVO%s\n",functable[index].name);
  538.         fprintf(linkh,"extern LONG %s();\n",functable[index].name);
  539.     }
  540.  
  541.     writeto(link,link2);
  542.  
  543.     writeto(interface,face2);
  544.  
  545.     for ( index = 0 ; index < ftcounter ; index++  ) {
  546.         fprintf(link,"        public _%s\n",functable[index].name);
  547.         fprintf(interface,"        public  _%s\n",functable[index].name);
  548.     }
  549.  
  550.     writeto(interface,facemid);
  551.     fprintf(link,"\n");
  552.  
  553.     for ( index = 0 ; index < ftcounter ; index++  ) {
  554.         fprintf(link,"_%s:\n",functable[index].name);
  555.  
  556.         /* check here for arguments and which registers to put them in */
  557.         if ( functable[index].numofargs > 4 )
  558.             fprintf(link,"        store\n");
  559.  
  560.         for ( num = 0 ; num < functable[index].numofargs ; num++ )
  561.             fprintf(link,"        move.l  %d(sp),%s\n",num*4+4,regs[num]);
  562.  
  563.         fprintf(link,"        move.l  _libbase,a6\n");
  564.  
  565.         if ( functable[index].numofargs > 4 ) {
  566.             fprintf(link,"        jsr     _LVO%s(a6)\n",functable[index].name);
  567.             fprintf(link,"        retrieve\n");
  568.             fprintf(link,"        rts\n\n");
  569.         } else {
  570.             fprintf(link,"        jmp     _LVO%s(a6)\n\n",functable[index].name);
  571.         }
  572.  
  573.         fprintf(interface,"X%s:\n",functable[index].name);
  574.         fprintf(interface,"        setup\n");
  575.  
  576.         /* check here for arguments and how to put them on the stack */
  577.         for ( num = functable[index].numofargs - 1 ; num >= 0 ; num-- )
  578.             fprintf(interface,"        push %s\n",regs[num]);
  579.  
  580.         fprintf(interface,"        jsr _%s\n",functable[index].name);
  581.         fprintf(interface,"        restore ");
  582.         if ( functable[index].numofargs )
  583.             fprintf(interface,"%d",functable[index].numofargs*4);
  584.         fprintf(interface,"\n\n");
  585.     }
  586.  
  587.     fprintf(interface,"        end\n");
  588.  
  589.     fprintf(makefile,"OBJS=startup.o rtag.o interface.o lib.o ");
  590.     for ( index = 1 ; index < argc ; index++ ) {
  591.         to_dot_o(temp,argv[index]);
  592.         fprintf(makefile,"%s ",temp);
  593.     }
  594.  
  595.     fprintf(makefile,"\n\n%s: $(OBJS)\n",myname);
  596.  
  597.     writeto(makefile,makefooter);
  598.  
  599.     /* clean up the open files */
  600.     fclose(linkh);
  601.     fclose(lib);
  602.     fclose(interface);
  603.     fclose(link);
  604.     fclose(makefile);
  605.  
  606.     return();
  607. }
  608.  
  609. main(argc,argv)
  610. int argc;
  611. char **argv;
  612. {
  613.     int index = 1;
  614.  
  615.     /* check for correct usage */
  616.     if ( argc < 2  ) {
  617.         printf("Usage: %s library_source_file ...\n",argv[0]);
  618.         exit(1);
  619.     }
  620.  
  621.     /* open files and write out initial info */
  622.     init();
  623.  
  624.     /* search through each source file for routines and add each routine
  625.        to the appropriate spot */
  626.     while ( index < argc  )
  627.         process(argv[index++]);
  628.  
  629.     /* write out final info and close files */
  630.     shutdown(argc,argv);
  631.  
  632.     exit(0);
  633. }
  634.  
  635. SHAR_EOF
  636. cat << \SHAR_EOF > mklib.h
  637. /*
  638.     Mklib 1.0 - a source file generator for Amiga shared libraries
  639.     Compiled with Manx v3.6a small code model/16 bit int. (see makefile)
  640.  
  641.     copyright 1988 Edwin Hoogerbeets
  642.  
  643.     This software and the files it produces are freely redistributable
  644.     as long there is no charge beyond reasonable copy fees and as long
  645.     as this notice stays intact.
  646.  
  647.     Thanks to Jimm Mackraz for Elib on Fish 87, from which much of this
  648.     program is lifted. Also thanks to Neil Katin for his mylib.asm upon
  649.     which elib is based.
  650. */
  651. #define MAXFUNC 50
  652. #define MAXLEN  64
  653.  
  654. /* definitions of token types */
  655. #define NOTHING 0       /* end of input     */
  656. #define IDENT   1       /* identifier       */
  657. #define OBRACE  2       /* open brace {     */
  658. #define CBRACE  3       /* close brace }    */
  659. #define LONGT   4       /* 'LONG' keyword   */
  660. #define OBRACK  5       /* open bracket (   */
  661. #define CBRACK  6       /* close bracket )  */
  662. #define COMMA   7       /* comma ,          */
  663. #define EXT     8       /* 'extern' keyword */
  664. #define SEMI    9       /* semicolon ;      */
  665. #define CHAR    10      /* 'char' keyword   */
  666. #define MYNAME  11      /* 'myname' token   */
  667. #define STAR    12      /* * is born yuk yuk*/
  668. #define QUOTE   13      /* quote "          */
  669. #define MYID    14      /* 'myid' keyword   */
  670. #define OTHER   20      /* everything else  */
  671.  
  672. char myname[MAXLEN];    /* storage for final name of library */
  673. int mynamedef = 0;      /* is myname defined? */
  674. char myid[MAXLEN];      /* storage for final id of library */
  675. int myiddef = 0;        /* is myid defined ? */
  676.  
  677. typedef struct {        /* structure to hold function names */
  678.     char name[MAXLEN];
  679.     int numofargs;
  680. } ftable;
  681.  
  682. ftable functable[MAXFUNC];
  683. int ftcounter = 0;
  684.  
  685. char tempfunc[MAXLEN];
  686. int tempc = 0;
  687.  
  688. FILE *startup, *interface, *link, *romtag, *makefile, *lib, *inc, *linkh;
  689.  
  690. void shutdown();
  691.  
  692. extern char *asmheader[], *cheader[], *makeheader[], *startupcode[];
  693. extern char *rtag[], *mandatory[], *incbody[], *faceheader[], *linkhead[];
  694. extern char *link2[], *face2[], *makefooter[], *facemid[];
  695.  
  696. #define NUMOFREGS 14
  697.  
  698. char *regs[] = {
  699.     "d0", "d1", "a0", "a1", "d2", "d3", "d4", "d5",
  700.     "d6", "d7", "a2", "a3", "a4", "a5", NULL
  701. };
  702.  
  703. SHAR_EOF
  704. cat << \SHAR_EOF > mklib.man
  705. MKLIB(1)                   Library Functions                  MKLIB(1)
  706.  
  707.  
  708.  
  709. NAME
  710.      mklib - a source file generator for Amiga shared libraries
  711.  
  712.  
  713.      mklib file [ file ... ]
  714.  
  715. DESCRIPTION
  716.      Mklib is a utility that allows you to write code for an Amiga shared
  717.      library in C and automatically produce files that allow you to
  718.      generate this library. Normally, Amiga shared libraries are coded in
  719.      assembler, and are passed arguments in registers. These arguments must
  720.      be pushed onto the stack before a C routine in the library can be
  721.      called.
  722.  
  723.      To use mklib, follow this sequence of steps:
  724.  
  725.         1 - code your library routines and save them in any number
  726.             of `.c' files.
  727.  
  728.         2 - make sure the following two variables are defined once
  729.             using these exact names:
  730.  
  731.                 char myname[] = "mylib.library";
  732.                 char myid[] = "mylib 1.0 (23 Oct 1986)\r\n";
  733.  
  734.             The Amiga's OS requires that the name of the library
  735.             be included within the library itself. Myid may
  736.             contain any identifying information that you wish
  737.             to have included.
  738.  
  739.         3 - put your source files in their own directory. This makes
  740.             it easy to contain the various generated files and to
  741.             prevent mklib from overwriting files that may already
  742.             exist. (such as "makefile")
  743.  
  744.         4 - run mklib and specify your source files.
  745.  
  746.         5 - assuming the compiler, the assembler, the linker and
  747.             the librarian are in your search path, you can now
  748.             simply type "make" to automatically generate a library
  749.             file.
  750.  
  751.         6 - Once you have done this, copy the library to the LIBS:
  752.             directory so that AmigaDOS can automatically load it
  753.             when required.
  754.  
  755.      When programming the library functions, remember that stdin, stdout
  756.      and stderr will not be correct. Most clib library routines should be
  757.      avoided.
  758.  
  759.      Also, when coding the library routines, keep in mind that there may be
  760.      more than one process running your library. Therefore, you should make
  761.      your code re-entrant. The use of global variables in a library is a
  762.      Bad Thing if you do not use semaphores or other such techniques to
  763.      prevent race conditions.
  764.  
  765.      To use the final library, a user program must be linked with link.o
  766.      which is generated from the link.asm which, in turn, is generated by
  767.      mklib. Also, the file link.h must be included in the user program to
  768.      declare externally the functions in the the new library.
  769.  
  770.      Open and use the library as you would open and use any other library
  771.      such as the intuition.library. Remember to close the library before
  772.      exiting your function.
  773.  
  774.      The generated makefile contains an example makefile entry for the user
  775.      program, but it is commented out. Take away the comments and add your
  776.      own program name to get make to generate a program that uses the newly
  777.      created library.
  778.  
  779.      The file link.h contains the following declaration:
  780.  
  781.          APTR libbase;
  782.  
  783.      This variable _must_ be used to store your library pointer when your
  784.      library is opened. The routines in the file link.asm use this variable
  785.      to find the exact locations of the functions in the shared library.
  786.  
  787. PARAMETERS
  788.  
  789.      You may call a library generated with mklib as you would any other
  790.      library from either Manx C, Lattice C, assembler or even other
  791.      languages that support libraries. The parameters to the generated
  792.      libraries should be in the following order:
  793.  
  794.          d0  for the first parameter
  795.          d1  second
  796.          a0  third
  797.          a1  fourth
  798.  
  799.      and so on:
  800.  
  801.          d2, d3, d4, d5, d6, d7, a2, a3, a4, a5
  802.  
  803.      There is a maximum of 14 parameters. If you need to pass more
  804.      information, create a structure containing this data and pass a
  805.      pointer to the structure.
  806.  
  807. EXAMPLES
  808.      The following is an example of source that you may use to
  809.      to generate a library.
  810.  
  811.          /* this is a test library */
  812.          #include <exec/types.h>
  813.  
  814.          char myname[] = "mylib.library";
  815.          char myid[] = "mylib 1.0 (23 Oct 1986)\r\n";
  816.  
  817.          LONG GetDown()
  818.          {
  819.                  return (77);
  820.          }
  821.  
  822.          ULONG Double(arg)
  823.          ULONG arg;
  824.          {
  825.                  return (2 * arg);
  826.          }
  827.  
  828.          LONG Triple(arg)
  829.          LONG arg;
  830.          {
  831.              arg *= 3;
  832.  
  833.              return ((LONG)arg);
  834.          }
  835.  
  836.  
  837.      The following is an example program that uses the library
  838.      generated from the source above:
  839.  
  840.          #include <exec/types.h>
  841.          #include <stdio.h>
  842.          #include <functions.h>
  843.          #include "link.h"
  844.  
  845.          #define RTC printf("return to continue - ");fflush(stdout);\
  846.          getchar();
  847.  
  848.          #define DOUBARG 19
  849.  
  850.          main()
  851.          {
  852.                  LONG    retval;
  853.  
  854.                  printf("here we go\n");
  855.                  libbase = (APTR) OpenLibrary("mylib.library", 0L);
  856.                  printf("openlib returns base: %lx\n", libbase);
  857.  
  858.                  RTC;
  859.  
  860.                  if (libbase)
  861.                  {
  862.                          /* test function GetDown()      */
  863.                          retval = GetDown();
  864.                          printf("called getdown, %ld returned\n", retval);
  865.                          RTC;
  866.  
  867.                          /* test function Double()       */
  868.                          printf("double of %d = %ld\n", DOUBARG, Double((LONG)DOUBARG));
  869.                          RTC;
  870.  
  871.                          /* test function Triple()       */
  872.                          printf("Here is three times %d: %ld\n",DOUBARG,
  873.                                  Triple((LONG)DOUBARG));
  874.                          RTC;
  875.  
  876.                          CloseLibrary(libbase);
  877.                  }
  878.          }
  879.  
  880. AUTHOR
  881.      Edwin Hoogerbeets 12/08/88 working from the Elib example on
  882.      Fish 87.
  883.  
  884. FILES
  885.      *.c               - your source files for the library
  886.      interface.asm     - assembler/C interface routines
  887.      lib.c             - required library functions (Open, Close, Expunge)
  888.      lib.h             - header for lib.c
  889.      link.asm          - file to link with code using the generated
  890.                          library
  891.      link.h            - include file for programs using the generated
  892.                          library file
  893.      makefile          - makefile for the generated code
  894.      rtag.asm          - romtag code used to help replace crt0
  895.      startup.asm       - new version of crt0 to replace default crt0
  896.      whatever.library  - final Amiga shared library
  897.  
  898. BUGS
  899.      As yet, all user library routines must be defined as LONG or ULONG and
  900.      must take only arguments of type LONG or ULONG. All functions not
  901.      declared this way will be ignored by mklib. This may be changed in
  902.      subsequent version of mklib.
  903.  
  904.      Mklib is written for Manx Aztec C. Although it has not been tried with
  905.      Lattice, it will should compile fine. However, it may need some
  906.      changes in the output generated to conform to Lattice. Currently,
  907.      mklib has only been tested with Manx version 3.6a.
  908.  
  909.      Mklib does not allow you to specify your own name for the pointer to
  910.      the library in a user program. The variable 'libbase' must always be
  911.      used.
  912. SHAR_EOF
  913. cat << \SHAR_EOF > mklib.uu
  914.  
  915. begin 777 mklib
  916. M```#\P`````````#``````````(``!/C```%Q`````$```/I```3XT[Z/I!D7
  917. M,`!D,0!A,`!A,0!D,@!D,P!D-`!D-0!D-@!D-P!A,@!A,P!A-`!A-0!.50``P
  918. M+RT`"$AZ`!Q(;(=@3KH[H$_O``P_/``!3KI,6%1/3EU.=45R<F]R.B`E<PH`)
  919. M`$Y5__Y";?_^,"W__DC`Y8`@;0`,2K`(`&<F,"W__E)M__Y(P.6`(&T`#"\PV
  920. M"`!(>@`4+RT`"$ZZ.TA/[P`,8,A.74YU)7,*`$Y5``!(>@'.2'H!ODZZ.HA0>
  921. M3RE`EJ9F"DAZ`;Q.NO]H6$](;(#F+RR6IF&,4$](;(%*+RR6IF&`4$\O+):FC
  922. M3KI'FEA/2'H!NDAZ`:U.NCI(4$\I0):R9@I(>@&H3KK_*%A/2&R`YB\LEK).3
  923. MNO],4$](;(*.+RR6LDZZ_SY03R\LEK).ND=66$](>@&92'H!CTZZ.@103RE`:
  924. MEKYF"DAZ`8=.NO[D6$](;($6+RR6ODZZ_PA03TALA78O+):^3KK^^E!/+RR6U
  925. MODZZ1Q)83TAZ`8%(>@%W3KHYP%!/*4"6NF8*2'H!;TZZ_J!83TAL@18O+):Z"
  926. M3KK^Q%!/2'H!?TAZ`71.NCF44$\I0);"9@I(>@%M3KK^=%A/2&R!%B\LEL).D
  927. MNOZ84$](>@&(2'H!=DZZ.6A03RE`EJIF"DAZ`79.NOY(6$](;(#F+RR6JDZZ_
  928. M_FQ03TALA-XO+):J3KK^7E!/2'H!?TAZ`7).NCDN4$\I0):N9@I(>@%M3KK^5
  929. M#EA/2&R`YB\LEJY.NOXR4$](;(7>+RR6KDZZ_B103TAZ`7-(>@%F3KHX]%!/V
  930. M*4"6MF8*2'H!84ZZ_=183TAL@$8O+):V3KK]^%!/3EU.=7-T87)T=7`N87-MV
  931. M`'<`0V]U;&0@;F]T(&]P96X@<W1A<G1U<"!C;V1E(&9I;&4`<G1A9RYA<VT`\
  932. M=P!#;W5L9"!N;W0@;W!E;B!R;VUT86<@9FEL90!L:6(N:`!W`$-O=6QD(&YO3
  933. M="!O<&5N(&QI8G)A<GD@:6YC;'5D92!F:6QE`&QI8BYC`'<`0V]U;&0@;F]T&
  934. M(&]P96X@;&EB<F%R>2!M86EN(&9I;&4`;&EN:RYH`'<`0V]U;&0@;F]T(&]P.
  935. M96X@;&EN:R!H96%D97(@;6%I;B!F:6QE`&EN=&5R9F%C92YA<VT`=P!#;W5L9
  936. M9"!N;W0@;W!E;B!L:6)R87)Y(&EN=&5R9F%C92!F:6QE`&QI;FLN87-M`'<`A
  937. M0V]U;&0@;F]T(&]P96X@;&EB<F%R>2!L:6YK97(@9FEL90!M86ME9FEL90!WI
  938. M`$-O=6QD(&YO="!O<&5N(&UA:V5F:6QE``!.5?_Z.WP``?_\0FW_^B\M``A.!
  939. MNC9N6$\;0/__2(!20$'LAK((,``$``!G`F#@#"T`____9@9P`$Y=3G4,+0!<7
  940. M__]F#B\M``A.NC8X6$]P%&#F#"T`+___9GPO+0`(3KHV(EA/&T#__[`\`"IF%
  941. M4"\M``A.NC8.6$\;0/__L#P`_V<N2FW__&<H#"T`+___9@Q*;?_Z9P9";?_\@
  942. M8`1";?_Z#"T`*O__9@8[?``!__I@O@PM`/___V8&<`!@`/]\+RT`"!`M__](\
  943. M@#\`3KHW?%Q/<!1@`/]D$"W__TB`/P!.NC3\5$]*0&<``/Y";(`(,"R`"%)L0
  944. M@`A![)9F$:W__P``+RT`"$ZZ-7Q83QM`__](@#\`3KHTD%1/2D!F"`PM`"[_>
  945. M_V84,"R`"%)L@`A![)9F$:W__P``8,@P+(`(0>R69D(P```O+0`($"W__TB`6
  946. M/P!.NC;V7$](;)9F2'H`_$ZZ-QA03TI`9Q)(;)9F2'H`[TZZ-P903TI`9@9PP
  947. M!&``_KI(;)9F2'H`W4ZZ-NY03TI`9@9P"&``_J)(;)9F2'H`S$ZZ-M903TI`?
  948. M9@9P"F``_HI(;)9F2'H`N4ZZ-KY03TI`9@9P"V``_G)(;)9F2'H`J$ZZ-J90C
  949. M3TI`9@9P#F``_EIP`6``_E00+?__2(!(P&`V<`=@`/Y$<`E@`/X^<`)@`/XXU
  950. M<`-@`/XR<`5@`/XL<`9@`/XF<`Q@`/X@<`U@`/X:<!1@`/X4D+P````B9^Q=_
  951. M@&?64X!GV%.`9]I5@&>RD+P````/9["0O````$!GKE6`9[!@S&``_>),3TY'K
  952. M`%5,3TY'`&5X=&5R;@!C:&%R`&UY;F%M90!M>6ED``!.50``#&P`,H`&;#(O3
  953. M+0`(,"R`!L'\`$)![(F"T(@O`$ZZ,\)03S`L@`92;(`&P?P`0D'LB<(QK0`,X
  954. M"`!@"DAZ``Q.NOF>6$].74YU3W5T(&]F(&9U;F-T:6]N(&YA;64@=&%B;&4@P
  955. M<W!A8V4N(%)E8V]M<&EL92!W:71H(&)I9V=E<B!-05A&54Y#`$Y5_W9";?_Z8
  956. M2'H#3"\M``A.NC144$\K0/_\9A@O+0`(2'H#-DALAV!.NC3>3^\`#$Y=3G4O#
  957. M+?_\3KK\OEA/.T#_^&<``P0P+?_X2,!@``+B+RW__$ZZ_*)83SM`__BP?``)<
  958. M9PA*;?_X9P)@Y&```M9*;?_Z9@``P"\M__Q.NOQZ6$\[0/_XL'P``68``*HOR
  959. M+?_\3KK\9%A/.T#_^+!\``5F``"40FW_]DALEF9(;?^V3KHRIE!/+RW__$ZZP
  960. M_#Q83SM`__@,;0`&__AG2`QM``'_^&8&4FW_]F`J#&T`!__X9R)(;?^V+RT`7
  961. M"$AZ`HI(;?]V3KH[0$_O`!!(;?]V3KKX5EA/+RW__$ZZ^^Y83SM`__A@L"\M%
  962. M__Q.NOO>6$\[0/_XL'P`"6<./RW_]DAM_[9.NOY"7$]@``(,4FW_^F```@1*S
  963. M;?_Z9P13;?_Z8``!]DIM__IF``'$+RW__$ZZ^YI83SM`__BP?``,9@``Q"\M'
  964. M__Q.NON$6$\[0/_XL'P`"V922FR``F9,+RW__$ZZ^VI83SM`__@O+?_\3KK[K
  965. M7%A/.T#_^+!\``UF*"\M__Q.NOM(6$\[0/_XL'P``6842&R69DALB0).NC&06
  966. M4$\Y?``!@`)@6`QM``[_^&902FR`!&9*+RW__$ZZ^Q!83SM`__@O+?_\3KK[*
  967. M`EA/.T#_^+!\``UF*"\M__Q.NOKN6$\[0/_XL'P``6842&R69DALB4).NC$V'
  968. M4$\Y?``!@`1@``#L#&T`"__X9FY*;(`"9F@O+?_\3KKZM%A/.T#_^"\M__Q.%
  969. MNOJF6$\[0/_X+RW__$ZZ^IA83SM`__@O+?_\3KKZBEA/.T#_^+!\``UF*"\M<
  970. M__Q.NOIV6$\[0/_XL'P``6842&R69DALB0).NC"^4$\Y?``!@`)@=`QM``[_)
  971. M^&9L2FR`!&9F+RW__$ZZ^CY83SM`__@O+?_\3KKZ,%A/.T#_^"\M__Q.NOHB=
  972. M6$\[0/_X+RW__$ZZ^A183SM`__BP?``-9B@O+?_\3KKZ`%A/.T#_^+!\``%FK
  973. M%$ALEF9(;(E"3KHP2%!/.7P``8`$8"A@)OWX_@#]+O_:_]K_VOT._]K^#E6`8
  974. ML+P````)9.+C@#`[`.!.^P``8`#\[B\M__Q.NCY<6$]@`/S<<@!#;W5L9"!N+
  975. M;W0@;W!E;B!I;G!U="!F:6QE("5S"@!"860@9&5C;&%R871I;VX@<WEN=&%X[
  976. M(&EN(&9I;&4@)7,L(&9U;F-T:6]N("5S"@!.5?_^/SP`+B\M``Q.NB],7$\[]
  977. M0/_^+RT`#"\M``A.NB^24$\,;?____YG$C`M__Y20"!M``P,,`!C``!G$$AZ[
  978. M`"(O+0`(3KHW1E!/8!`P+?_^4D`@;0`($;P`;P``3EU.=2YO``!.5?^\2FR`V
  979. M`F8F2'H$<DALB0).NB\X4$](>@1R3KHX5EA/2'H$G"\LEKI.NC#04$]*;(`$V
  980. M9AA(>@2J3KHX.%A/2'H$UB\LEKI.NC"R4$](>@3L+RR6NDZZ,*103TAL@Q(OM
  981. M+):Z3KKU%E!/2'H$TB\LEL).NC"(4$](>@343KHR]EA/2'H%`DZZ,NQ83T)M.
  982. M__Y@``"6,"W__L'\`$)![(F"T(@O`#`M__[!_`!"0>R)PC\P"``_+?_^2'H$"
  983. MVTZZ-[9/[P`,,"W__L'\`$)![(F"T(@O`$AZ!-(O+):J3KHP'D_O``PP+?_^?
  984. MP?P`0D'LB8+0B"\`2'H$QR\LEJY.NB_^3^\`##`M__[!_`!"0>R)@M"(+P!()
  985. M>@2^+RR6PDZZ+]Y/[P`,4FW__C`M__ZP;(`&;0#_8DALA?(O+):N3KKT/E!/W
  986. M2&R&1B\LEJI.NO0P4$]";?_^8$0P+?_^P?P`0D'LB8+0B"\`2'H$?R\LEJY.`
  987. MNB^,3^\`##`M__[!_`!"0>R)@M"(+P!(>@1S+RR6JDZZ+VQ/[P`,4FW__C`MQ
  988. M__ZP;(`&;;)(;(".+RR6JDZZ\\Y03TAZ!%PO+):N3KHO0%!/0FW__F```?0P+
  989. M+?_^P?P`0D'LB8+0B"\`2'H$."\LEJY.NB\:3^\`##`M__[!_`!"0>R)P@QPM
  990. M``0(`&\.2'H$&B\LEJY.NB[V4$]";?_\8"XP+?_\2,#E@$'L@`HO,`@`,"W_*
  991. M_.5`6$`_`$AZ`_LO+):N3KHNR$_O``Y2;?_\,"W__L'\`$)![(G",BW__+)PH
  992. M"`!MO$AZ`^PO+):N3KHNGE!/,"W__L'\`$)![(G"#'``!`@`;SXP+?_^P?P`1
  993. M0D'LB8+0B"\`2'H#UR\LEJY.NBYL3^\`#$AZ`^,O+):N3KHN7%!/2'H#YR\LG
  994. MEJY.NBY.4$]@(#`M__[!_`!"0>R)@M"(+P!(>@/5+RR6KDZZ+BY/[P`,,"W_"
  995. M_L'\`$)![(F"T(@O`$AZ`](O+):J3KHN#D_O``Q(>@/(+RR6JDZZ+?Y03S`M3
  996. M__[!_`!"0>R)PC(P"`!303M!__Q@)#`M__Q(P.6`0>R`"B\P"`!(>@.A+RR6G
  997. MJDZZ+<A/[P`,4VW__$IM__QLUC`M__[!_`!"0>R)@M"(+P!(>@.(+RR6JDZZH
  998. M+9Y/[P`,2'H#B2\LEJI.NBV.4$\P+?_^P?P`0D'LB<)*<`@`9R0P+?_^P?P`5
  999. M0D'LB<(R,`@`Y4$_`4AZ`V8O+):J3KHM6D_O``I(>@-9+RR6JDZZ+4I03U)M]
  1000. M__XP+?_^L&R`!FT`_@1(>@,^+RR6JDZZ+2Q03TAZ`STO+):V3KHM'E!/.WP`8
  1001. M`?_^8#(P+?_^2,#E@"!M``HO,`@`2&W_O$ZZ^YI03TAM_[Q(>@,R+RR6MDZZ7
  1002. M+.I/[P`,4FW__C`M__ZP;0`(;<1(;(D"2'H#%"\LEK9.NBS(3^\`#$AL@'HON
  1003. M+):V3KKQ.%!/+RR6PDZZ.5!83R\LEKI.NCE&6$\O+):J3KHY/%A/+RR6KDZZR
  1004. M.3)83R\LEK9.NCDH6$].74YU;7EL:6(N;&EB<F%R>0!->6YA;64@=F%R:6%BS
  1005. M;&4@;F]T(&1E9FEN960Z('5S:6YG(")M>6QI8BYL:6)R87)Y(@H`8VAA<B!M*
  1006. M>6YA;65;72`](")M>6QI8BYL:6)R87)Y(CL*`$UY:60@=F%R:6%B;&4@;F]T"
  1007. M(&1E9FEN960Z('5S:6YG(")M>6QI8B!V97)S:6]N(#$N,"(*`&-H87(@;7EI<
  1008. M9%M=(#T@(FUY;&EB('9E<G-I;VX@,2XP(CL*``H`05!44B!L:6)B87-E.PH*6
  1009. M`%1H92!F;VQL;W=I;F<@3$].1R!F=6YC=&EO;G,@=V5R92!F;W5N9"!I;B!YZ
  1010. M;W5R('-O=7)C93H`(R`@.B!A<F=S(&YA;64`)2TS9#H@)60@("`@)2TS,',*J
  1011. M`"`@("`@("`@9&,N;"`@("!8)7,*`"`@("`@("`@3$E"1$5&(%],5D\E<PH`3
  1012. M97AT97)N($Q/3D<@)7,H*3L*`"`@("`@("`@<'5B;&EC(%\E<PH`("`@("`@4
  1013. M("!P=6)L:6,@(%\E<PH`"@!?)7,Z"@`@("`@("`@('-T;W)E"@`@("`@("`@<
  1014. M(&UO=F4N;"`@)60H<W`I+"5S"@`@("`@("`@(&UO=F4N;"`@7VQI8F)A<V4LJ
  1015. M838*`"`@("`@("`@:G-R("`@("!?3%9/)7,H838I"@`@("`@("`@(')E=')I0
  1016. M979E"@`@("`@("`@(')T<PH*`"`@("`@("`@:FUP("`@("!?3%9/)7,H838IN
  1017. M"@H`6"5S.@H`("`@("`@("!S971U<`H`("`@("`@("!P=7-H("5S"@`@("`@%
  1018. M("`@(&IS<B!?)7,*`"`@("`@("`@<F5S=&]R92``)60`"@H`("`@("`@("!E6
  1019. M;F0*`$]"2E,]<W1A<G1U<"YO(')T86<N;R!I;G1E<F9A8V4N;R!L:6(N;R``D
  1020. M)7,@``H*)7,Z("0H3T)*4RD*``!.5?_^.WP``?_^#&T``@`(;!H@;0`*+Q!(G
  1021. M>@!63KHQ!E!//SP``4ZZ.DA43TZZ[D8P+?_^L&T`"&P<,"W__E)M__Y(P.6`=
  1022. M(&T`"B\P"`!.NO146$]@VB\M``H_+0`(3KKX4%Q/0F=.NCH(5$].74YU57-AQ
  1023. M9V4Z("5S(&QI8G)A<GE?<V]U<F-E7V9I;&4@+BXN"@``(R!4:&ES(&UA:V5FU
  1024. M:6QE('=A<R!G96YE<F%T960@=VET:"!M:VQI8@`C(&-O<'ER:6=H="`Q.3@X5
  1025. M($5D=VEN($AO;V=E<F)E971S`",`(R!4:&ES('-O9G1W87)E(&ES(&9R965LA
  1026. M>2!R961I<W1R:6)U=&%B;&4@87,@;&]N9R!A<R!T:&5R92!I<R!N;R!C:&%R%
  1027. M9V4`(R!B97EO;F0@<F5S;VYA8FQE(&-O<'D@9F5E<R!A;F0@87,@;&]N9R!AA
  1028. M<R!T:&ES(&YO=&EC92!S=&%Y<R!I;G1A8W0N`",`(R!4:&%N:W,@=&\@2FEMD
  1029. M;2!-86-K<F%Z(&9O<B!%;&EB(&]N($9I<V@@.#<L(&9R;VT@=VAI8V@@;75CG
  1030. M:"!O9B!T:&ES`",@<')O9W)A;2!I<R!L:69T960N($%L<V\@=&AA;FMS('1O-
  1031. M($YE:6P@2V%T:6X@9F]R(&AI<R!M>6QI8BYA<VT@=7!O;@`C('=H:6-H(&5L?
  1032. M:6(@:7,@8F%S960N``!#1DQ!1U,]+50````@("`@("`@(&QN("0H3T)*4RD@_
  1033. M+6QC("UO("1````C>6]U<G!R;V<Z('EO=7)P<F]G+F\@;&EN:RYO`",@("`@R
  1034. M("`@;&X@>6]U<G!R;V<N;R!L:6YK+F\@+6QC("UO("1````@("`@("`@('!UJ
  1035. M8FQI8R`@7V=E=&$T``!M>6]P96XZ`"`@("`@("`@<V5T=7``("`@("`@("!P!
  1036. M=7-H(&$V`"`@("`@("`@:G-R("`@("!?;7E/<&5N`"`@("`@("`@<F5S=&]RL
  1037. M92`T``!M>6-L;W-E.@`@("`@("`@('-E='5P`"`@("`@("`@<'5S:"!A-@`@W
  1038. M("`@("`@(&IS<B`@("`@7VUY0VQO<V4`("`@("`@("!R97-T;W)E(#0``&UY(
  1039. M97AP=6YG93H`("`@("`@("!S971U<``@("`@("`@('!U<V@@838`("`@("`@>
  1040. M("!J<W(@("`@(%]M>45X<'5N9V4`("`@("`@("!R97-T;W)E(#0``#L@5&AIH
  1041. M<R!F:6QE('=A<R!G96YE<F%T960@=VET:"!M:VQI8@`[(&-O<'ER:6=H="`Q]
  1042. M.3@X($5D=VEN($AO;V=E<F)E971S`#L`.R!4:&ES('-O9G1W87)E(&ES(&9R$
  1043. M965L>2!R961I<W1R:6)U=&%B;&4@87,@;&]N9R!A<R!T:&5R92!I<R!N;R!C`
  1044. M:&%R9V4`.R!B97EO;F0@<F5S;VYA8FQE(&-O<'D@9F5E<R!A;F0@87,@;&]N,
  1045. M9R!A<R!T:&ES(&YO=&EC92!S=&%Y<R!I;G1A8W0N`#L`.R!4:&%N:W,@=&\@<
  1046. M2FEM;2!-86-K<F%Z(&9O<B!%;&EB(&]N($9I<V@@.#<L(&9R;VT@=VAI8V@@"
  1047. M;75C:"!O9B!T:&ES`#L@<')O9W)A;2!I<R!L:69T960N($%L<V\@=&AA;FMSG
  1048. M('1O($YE:6P@2V%T:6X@9F]R(&AI<R!M>6QI8BYA<VT@=7!O;@`[('=H:6-H)
  1049. M(&5L:6(@:7,@8F%S960N`#L``"\J`"`@(%1H:7,@9FEL92!W87,@9V5N97)A.
  1050. M=&5D('=I=&@@;6ML:6(`("`@8V]P>7)I9VAT(#$Y.#@@161W:6X@2&]O9V5R6
  1051. M8F5E=',``"`@(%1H:7,@<V]F='=A<F4@:7,@9G)E96QY(')E9&ES=')I8G5T*
  1052. M86)L92!A<R!L;VYG(&%S('1H97)E(&ES(&YO(&-H87)G90`@("!B97EO;F0@(
  1053. M<F5S;VYA8FQE(&-O<'D@9F5E<R!A;F0@87,@;&]N9R!A<R!T:&ES(&YO=&ECY
  1054. M92!S=&%Y<R!I;G1A8W0N```@("!4:&%N:W,@=&\@2FEM;2!-86-K<F%Z(&9OA
  1055. M<B!%;&EB(&]N($9I<V@@.#<L(&9R;VT@=VAI8V@@;75C:"!O9B!T:&ES`"`@1
  1056. M('!R;V=R86T@:7,@;&EF=&5D+B!!;'-O('1H86YK<R!T;R!.96EL($MA=&ENT
  1057. M(&9O<B!H:7,@;7EL:6(N87-M('5P;VX`("`@=VAI8V@@96QI8B!I<R!B87-E_
  1058. M9"X`*B\````[.G1S/3@`.R!#;W!Y<FEG:'0@*$,I(#$Y.#8@8GD@36%N>"!3>
  1059. M;V9T=V%R92!3>7-T96US+"!);F,N`#L``#L@*BHJ("`@0G5T($953DM)1DE%T
  1060. M1"!B>2!J:6UM("HJ*@`[("`@("`@(&QI8G)A<GD@8F%S92!I;B!$,``[("`@;
  1061. M("`@('-E9VUE;G0@;&ES="!I;B!!,``[("`@("`@(&5X96-B87-E(&EN($$V`
  1062. M```[("`@("`@($EN:71I86P@<W1A<G1U<"!R;W5T:6YE(&9O<B!!>G1E8R!#?
  1063. M+@``.R`@("`@("!.3U1%.B!C;V1E(&1O=VX@=&\@(G-T87)T(B!M=7-T(&)EQ
  1064. M('!L86-E9"!A="!B96=I;FYI;F<@;V8`.R`@("`@("`@("`@("`@(&%L;"!PH
  1065. M<F]G<F%M<R!L:6YK960@=VET:"!!>G1E8R!,:6YK97(@=7-I;F<@<VUA;&P`)
  1066. M.R`@("`@("`@("`@("`@(&-O9&4@;W(@<VUA;&P@9&%T82X```!A-'-A=F4@\
  1067. M(&1C+FP@("`@,```("`@("`@("!P=6)L:6,@("YB96=I;B`@("`@("`@("`@#
  1068. M("`@("`@(#L@:G5S="!T;R!R97-O;'9E(&QA8F5L`"YB96=I;@`@("`@("`@7
  1069. M('!U8FQI8R`@7V9U;FMY26YI=`!?9G5N:WE);FET.@``("`@("`@("!N96%R_
  1070. M("`@(&-O9&4``"`@("`@("`@;6]V96TN;"!D,"]D,B]D,R]D-"UD-R]A,BUAW
  1071. M-BPM*'-P*0``("`@("`@("`[($953DM9('5S92!A,"P@;F]T(&$Q(&9O<B!S2
  1072. M96=M96YT(&QI<W0`("`@("`@("!M;W9E+FP@(&$P+&$T("`@("`@("`@("`@_
  1073. M("`@("`@(#M"4%12('1O(&-O9&4@<V5G`"`@("`@("`@861D+FP@("!A-"QAU
  1074. M-``@("`@("`@(&%D9"YL("`@830L830@("`@("`@("`@("`@("`@("`@.VYOE
  1075. M=R!R96%L(&%D9')E<W,@;V8@8V]D92!S96<``"`@("`@("`@;6]V92YL("`H)
  1076. M830I+&$T("`@("`@("`@("`@("`@("`[:6YD:7)E8W0@=&\@9V5T(&1A=&$@I
  1077. M<V5G;65N="!"4%12`"`@("`@("`@861D+FP@("!A-"QA-"`@("`@("`@("`@D
  1078. M("`@("`@("`[8V]N=F5R="!T;R!R96%L('!O:6YT97(`("`@("`@("!A9&0N[
  1079. M;"`@(&$T+&$T("`@("`@("`@("`@("`@("`@(#MR96%L(&%D9')E<W,@;V8@\
  1080. M9&%T82!S96<@;&EN:R!F:65L9```("`@("`@("`[('-A;64@87,@8W)T,"YA(
  1081. M-C@`("`@("`@("!A9&0N;"`@(",S,C<V-BLT+&$T("`@("`@("`@("`@(#MB9
  1082. M:6%S(&%P<')O<')I871E;'D@*"LT(&ES(&9O<B!L:6YK*0`@("`@("`@(&QE[
  1083. M82`@("`@7U](,5]E;F0L83$`("`@("`@("!L96$@("`@(%]?2#)?;W)G+&$R\
  1084. M`"`@("`@("`@8VUP+FP@("!A,2QA,B`@("`@("`@("`@("`@("`@("`[8VAE6
  1085. M8VL@:68@0E-3(&%N9"!$051!('1O9V5T:&5R`"`@("`@("`@8FYE("`@("!S<
  1086. M=&%R="`@("`@("`@("`@("`@("`@("`[;F\L(&1O;B=T(&AA=F4@=&\@8VQEV
  1087. M87(`("`@("`@("!M;W9E+G<@(",H*%]?2#)?96YD+5]?2#)?;W)G*2\T*2TQ/
  1088. M+&0Q`"`@("`@("`@8FUI("`@("!S=&%R="`@("`@("`@("`@("`@("`@("`[B
  1089. M<VMI<"!I9B!N;R!B<W,`("`@("`@("!M;W9E+FP@(",P+&0R`&QO;W``("`@+
  1090. M("`@("!M;W9E+FP@(&0R+"AA,2DK("`@("`@("`@("`@("`@(#MC;&5A<B!O2
  1091. M=70@;65M;W)Y`"`@("`@("`@9&)R82`@("!D,2QL;V]P``!S=&%R=``@("`@D
  1092. M("`@(&QE82`@("`@831S879E+&$Q("`@("`@("`@("`@("`@.V=E="!A9&1RJ
  1093. M97-S(&]F(&$T<V%V90`@("`@("`@(&UO=F4N;"`@830L*&$Q*2`@("`@("`@9
  1094. M("`@("`@("`@.W-A=F4@830`.R`@("`@("!&54Y+60`[("`@("`@(&UO=F4NG
  1095. M;"`@<W`L7U]S879S<"`@("`@("`@("`@("`@.W-A=F4@<W1A8VL@<&]I;G1EU
  1096. M<B`H8V%N)W0@9F5X96,I`#L@("`@("`@;6]V92YL("`T+&$V("`@("`@("`@>
  1097. M("`@("`@("`@("`[9V5T($5X96,G<R!L:6)R87)Y(&)A<V4@<&]I;G1E<@`@K
  1098. M("`@("`@(&UO=F4N;"`@838L7U-Y<T)A<V4@("`@("`@("`@("`@.W!U="!W8
  1099. M:&5R92!W92!C86X@9V5T(&ET```@("`@("`@(&UO=F5M+FP@9#`O83`L+2ASU
  1100. M<"D@("`@("`@("`@("`@.R!P87-S(&)A<V4@86YD('-E9VQI<W0`("`@("`@T
  1101. M("!J<W(@("`@(%]F=6YK>6UA:6X@("`@("`@("`@("`@(#L@1E5.2UD`("`@H
  1102. M("`@("!A9&1Q+FP@(",X+'-P("`@("`@("`@("`@("`@("`@(#MP;W`@87)G"
  1103. M<R!T;R`@9G5N:WEM86EN*"D`("`@("`@("`@("`@("`@("`@("`@("`@("`@Y
  1104. M("`@("`@("`@("`@(#L@8V%N('!O<"!B971T97(@*#\I```@("`@("`@(&UO.
  1105. M=F5M+FP@*'-P*2LL9#`O9#(O9#,O9#0M9#<O83(M838`("`@("`@("!R=',@Z
  1106. M("`@("`@("`@("`@("`@("`@("`@("`@("`@(#MA;F0@<F5T=7)N```@("`@N
  1107. M("`@('!U8FQI8R`@7V=E=&$T`%]G971A-#H`("`@("`@("!M;W9E+FP@(&$T'
  1108. M<V%V92QA-``@("`@("`@(')T<P``("`@("`@("!D<V5G````7U-Y<T)A<V4@E
  1109. M("`@("`@(&1C+FP@("`@,```("`@("`@("!P=6)L:6,@(%]F=6YK>6UA:6X`A
  1110. M("`@("`@("!P=6)L:6,@(%]3>7-"87-E`"`@("`@("`@<'5B;&EC("!?7T@Q.
  1111. M7V5N9"Q?7T@R7V]R9RQ?7T@R7V5N9```("`@("`@("!E;F0``#L@("`@("`@M
  1112. M<G1A9RYA<VT@+2T@<F]M=&%G```@("`@("`@("!I;F-L=61E("=E>&5C+W1Y-
  1113. M<&5S+FDG`"`@("`@("`@(&EN8VQU9&4@)V5X96,O<F5S:61E;G0N:2<`("`@A
  1114. M("`@("`@:6YC;'5D92`G97AE8R]N;V1E<RYI)P`@("`@("`@("!I;F-L=61E:
  1115. M("=E>&5C+VQI8G)A<FEE<RYI)P``35E615)324].("`@("`@(&5Q=2`@("`@M
  1116. M,0!-65!222`@("`@("`@("`@97%U("`@("`P```@("`@("`@("!C<V5G("`@?
  1117. M(#L@<F]M=&%G(&UU<W0@8F4@:6X@9FER<W0@:'5N:P``("`@("`@("`@<'5B1
  1118. M;&EC("!?;7EN86UE`"`@("`@("`@('!U8FQI8R`@7VUY:60`("`@("`@("`@O
  1119. M<'5B;&EC("!?;7E);FET5&%B```@("`@("`@("!D<R`@("`@(#``("`@("`@6
  1120. M("`@<'5B;&EC("!?;7E2;VU486<`7VUY4F]M5&%G.@`@("`@("`@("!D8RYW#
  1121. M("`@(%)40U]-051#2%=/4D0`("`@("`@("`@9&,N;"`@("!?;7E2;VU486<`!
  1122. M("`@("`@("`@9&,N;"`@("!E;F1T86<`("`@("`@("`@9&,N8B`@("!25$9?V
  1123. M05543TE.250`("`@("`@("`@9&,N8B`@("!-659%4E-)3TX`("`@("`@("`@0
  1124. M9&,N8B`@("!.5%],24)205)9`"`@("`@("`@(&1C+F(@("`@35E04DD`("`@5
  1125. M("`@("`@9&,N;"`@("!?;7EN86UE`"`@("`@("`@(&1C+FP@("`@7VUY:60`:
  1126. M("`@("`@("`@9&,N;"`@("!?;7E);FET5&%B`&5N9'1A9SH``"`@("`@("`@>
  1127. M(&5N9``O*B!C<F5A=&5D(&)Y(&II;2!M86-K<F%Z('5S:6YG(&UY;&EB+F%S1
  1128. M;2!B>2!N96EL(&MA=&EN`"`J(&UA>2!B92!U<V5D(&%N9"!D:7-T<FEB=71E"
  1129. M9"!P<F]V:61I;F<@=&AI<R!C;VUM96YT(&)L;V-K`"`J(&ES(')E=&%I;F5D>
  1130. M(&EN('1H92!S;W5R8V4@8V]D90`@*B\`(VEN8VQU9&4@/'-T9&EO+F@^`"-IC
  1131. M;F-L=61E(")L:6(N:"(``&5X=&5R;B`@4$9,("`@("!L:6)F=6YC=&%B6UT[1
  1132. M("`@+RH@;7D@9G5N8W1I;VX@=&%B;&4@*&QI8F9A8V4N87-M*2`@("`@("`@3
  1133. M("`@("`@*B\`97AT97)N("!,3TY'("`@(&9U;FMY26YI="@I.R`@("`O*B!H-
  1134. M86-K960@=7`@=F5R<VEO;B!O9B!!>G1E8R!C<G0P+F$V."`@*B\``$Q/3D<@N
  1135. M("`@;7E%>'!U;F=E*"D[``!S=')U8W0@26YI=%1A8FQE(&UY26YI=%1A8B`]]
  1136. M("![`"`@("`@("`@<VEZ96]F("AS=')U8W0@37E"87-E*2P`("`@("`@("!L:
  1137. M:6)F=6YC=&%B+``@("`@("`@($Y53$PL("`@("`@("`@("`@("`@("`@("`@A
  1138. M("`@("`@("`@("`@("`O*B!W:6QL(&EN:71I86QI>F4@;7D@9&%T82!I;B!F`
  1139. M=6YK>6UA:6XH*2`@("`@("`J+P`@("`@("`@(&9U;FMY26YI=`!].P``(V1E;
  1140. M9FEN92!-65)%5DE324].("`@("`@,"`@("`@("`@("`@("`@("\J('=O=6QD+
  1141. M(&)E(&YI8V4@=&\@875T;RUI;F-R96UE;G0@=&AI<R`@("`@("`@("HO``!EJ
  1142. M>'1E<FX@8VAA<B!M>6YA;65;73L`97AT97)N(&-H87(@;7EI9%M=.P``97ATT
  1143. M97)N('-T<G5C="!297-I9&5N="`@;7E2;VU486<[```O*@`@*B!T:&ES(&9U)
  1144. M;F-T:6]N(&ES(&UY($,M;&%N9W5A9V4@;&EB<F%R>2!I;FET4F]U=&EN92X@^
  1145. M($ET(&ES(&-A;&QE9``@*B!B>2!F=6YK>4EN:70H*2!A9G1E<B!R96=I<W1E:
  1146. M<B!S879E<R!A;F0@<VUA;&P@;6]D96P@:6YI=&EA;&EZ871I;VX@:7,`("H@?
  1147. M9&]N92X`("HO``!,3TY'`&9U;FMY;6%I;BAL:6)B87-E+"!S96=L:7-T*0!SL
  1148. M=')U8W0@($UY0F%S92`@*FQI8F)A<V4[`%5,3TY'("`@("`@("`@("`@("`@/
  1149. M("`@('-E9VQI<W0[`'L`("`@("`@("!R96=I<W1E<B`@("`@("`@<W1R=6-T[
  1150. M($UY0F%S92`J8F%S93L``"`@("`@("`@+RH@8V]O:VEE("`@("`@("HO`"`@M
  1151. M("`@("`@8F%S92`](&QI8F)A<V4[`"`@("`@("`@8F%S92T^;6)?0V]O:VEES
  1152. M(#T@,'A$14%$,3(S-#L@("`O*B!D96)U9R!K:6YD(&]F('-T=69F("`@("`@;
  1153. M("`@("`@("`@("`@("`@("`@("`J+P`@("`@("`@(&)A<V4M/FUB7U-E9TQIA
  1154. M<W0@/2!S96=L:7-T.P``("`@("`@("`O*B!I;FET+B!L:6)R87)Y('-T<G5C;
  1155. M='5R92`H<VEN8V4@22!D;VXG="!D;R!A=71O;6%T:6,@9&%T82!I;FET+BD@>
  1156. M("`@("`J+P`@("`@("`@(&)A<V4M/FUB7TQI8BYL:6)?3F]D92YL;E]4>7!E7
  1157. M(#T@3E1?3$E"4D%263L`("`@("`@("!B87-E+3YM8E],:6(N;&EB7TYO9&4N1
  1158. M;&Y?3F%M92`]("AC:&%R("HI(&UY;F%M93L`("`@("`@("!B87-E+3YM8E],2
  1159. M:6(N;&EB7T9L86=S(#T@3$E"1E]354U54T5$('P@3$E"1E]#2$%.1T5$.P`@8
  1160. M("`@("`@(&)A<V4M/FUB7TQI8BYL:6)?5F5R<VEO;B`](&UY4F]M5&%G+G)T6
  1161. M7U9E<G-I;VX[`"`@("`@("`@8F%S92T^;6)?3&EB+FQI8E]2979I<VEO;B`][
  1162. M($U94D5625-)3TX[`"`@("`@("`@8F%S92T^;6)?3&EB+FQI8E])9%-T<FEN\
  1163. M9R`]("A!4%12*2!M>6ED.P``("`@("`@("`O*B`M+2TM+2!D;R!Y;W5R(&]W\
  1164. M;B!I;FET:6%L:7IA=&EO;B!H97)E("TM+2TM("`J+P!]``!,3TY'`&UY3W!E+
  1165. M;BAB87-E*2`@("`O*B!B87-E<'1R(&EN($$V+"!V97)S:6]N(&EN($0P("HOH
  1166. M`'-T<G5C="`@37E"87-E("IB87-E.P![`"`@("`@("`@+RH@;6%R:R!U<R!AN
  1167. M<R!H879I;F<@86YO=&AE<B!C=7-T;VUE<B`@("`@("`@("`@("`@("`@("`@S
  1168. M("`@("`@("`@("`@("`@*B\`("`@("`@("!B87-E+3YM8E],:6(N;&EB7T]P'
  1169. M96Y#;G0K*SL``"`@("`@("`@+RH@<')E=F5N="!D96QA>65D(&5X<'5N9V5S-
  1170. M("AS=&%N9&%R9"!P<F]C961U<F4I("`@("`@("`@("`@("`@("HO`"`@("`@D
  1171. M("`@8F%S92T^;6)?3&EB+FQI8E]&;&%G<R`F/2!^3$E"1E]$14Q%6%`[```@6
  1172. M("`@("`@(')E='5R;B`H*$Q/3D<I(&)A<V4I.P!]``!,3TY'`&UY0VQO<V4H9
  1173. M8F%S92D`<W1R=6-T("!->4)A<V4@*F)A<V4[`'L`("`@("`@("!,3TY'("`@5
  1174. M(')E='9A;"`](#`[```@("`@("`@(&EF("@H+2UB87-E+3YM8E],:6(N;&EB?
  1175. M7T]P96Y#;G0@/3T@,"D@)B8`("`@("`@("`@("`@("`@("`@("`@("`@*&)A`
  1176. M<V4M/FUB7TQI8BYL:6)?1FQA9W,@)B!,24)&7T1%3$584"DI`"`@("`@("`@O
  1177. M>P`@("`@("`@("`@("`@("`@+RH@;F\@;6]R92!P96]P;&4@:&%V92!M92!O.
  1178. M<&5N+``@("`@("`@("`@("`@("`@("H@86YD($D@:&%V92!A(&1E;&%Y960@2
  1179. M97AP=6YG92!P96YD:6YG`"`@("`@("`@("`@("`@("`@*B\`("`@("`@("`@:
  1180. M("`@("`@(')E='9A;"`](&UY17AP=6YG92@I.R`O*B!R971U<FX@<V5G;65N1
  1181. M="!L:7-T("`@("HO`"`@("`@("`@?0``("`@("`@("!R971U<FX@*')E='9AP
  1182. M;"D[`'T``$Q/3D<`;7E%>'!U;F=E*&)A<V4I`'-T<G5C="`@37E"87-E("`J[
  1183. M8F%S93L`>P`@("`@("`@(%5,3TY'("`@("`@("`@("`@("`@("`@('-E9VQI*
  1184. M<W0@/2`P.P`@("`@("`@($Q/3D<@("`@("`@("`@("`@("`@("`@(&QI8G-I2
  1185. M>F4[```@("`@("`@(&EF("AB87-E+3YM8E],:6(N;&EB7T]P96Y#;G0@/3T@Q
  1186. M,"D`("`@("`@("![`"`@("`@("`@("`@("`@("`O*B!R96%L;'D@97AP=6YG-
  1187. M93H@<F5M;W9E(&QI8F)A<V4@86YD(&9R965M96T@("`J+P``("`@("`@("`@L
  1188. M("`@("`@('-E9VQI<W0@/2!B87-E+3YM8E]396=,:7-T.P``("`@("`@("`@B
  1189. M("`@("`@(%)E;6]V92AB87-E*3L``"`@("`@("`@("`@("`@("!L:6)S:7IEG
  1190. M(#T@8F%S92T^;6)?3&EB+FQI8E].96=3:7IE("L@8F%S92T^;6)?3&EB+FQIZ
  1191. M8E]0;W-3:7IE.P`@("`@("`@("`@("`@("`@1G)E94UE;2@H8VAA<B`J*2!B-
  1192. M87-E("T@8F%S92T^;6)?3&EB+FQI8E].96=3:7IE+"`H3$].1RD@;&EB<VEZD
  1193. M92D[`"`@("`@("`@?0`@("`@("`@(&5L<V4`("`@("`@("![`"`@("`@("`@J
  1194. M("`@("`@("!B87-E+3YM8E],:6(N;&EB7T9L86=S("8]($Q)0D9?1$5,15A0=
  1195. M.P`@("`@("`@('T````@("`@("`@("\J(')E='5R;B!.54Q,(&]R(')E86P@1
  1196. M<V5G;&ES="`J+P`@("`@("`@(')E='5R;B`H*$Q/3D<I('-E9VQI<W0I.P!]9
  1197. M````("`@("`@("!I;F-L=61E("=E>&5C+W1Y<&5S+FDG``!S971U<"`@(&UA1
  1198. M8W)O`"`@("`@("`@;6]V96TN;"!D,B]D,R]D-"UD-R]A,BUA-BPM*'-P*0`@`
  1199. M("`@("`@(&IS<B`@("`@7V=E=&$T`"`@("`@("`@96YD;0``<'5S:"`@("!M4
  1200. M86-R;P`@("`@("`@(&UO=F4N;"`@7#$L+2AS<"D`("`@("`@("!E;F1M``!F:
  1201. M:7@@("`@(&UA8W)O`"`@("`@("`@:69C("`@("`G7#$G+"<G`"`@("`@("`@Z
  1202. M("`@("`@("!M97AI=``@("`@("`@(&5N9&,`("`@("`@("!I9FQE("`@(%PQN
  1203. M+3@`("`@("`@("`@("`@("`@(&%D9'$N;"`@(UPQ+'-P`"`@("`@("`@96YD/
  1204. M8P`@("`@("`@(&EF9W0@("`@7#$M.``@("`@("`@("`@("`@("`@;&5A("`@1
  1205. M("!<,2AS<"DL<W``("`@("`@("!E;F1C`"`@("`@("`@96YD;0``<F5S=&]RM
  1206. M92!M86-R;P`@("`@("`@(&9I>"`@("`@7#$`("`@("`@("!M;W9E;2YL("AS$
  1207. M<"DK+&0R+V0S+V0T+60W+V$R+6$V`"`@("`@("`@<G1S`"`@("`@("`@96YDQ
  1208. M;0``("`@("`@("!D<V5G```@("`@("`@('!U8FQI8R`@7VQI8F9U;F-T86(`(
  1209. M7VQI8F9U;F-T86(Z`"`@("`@("`@9&,N;"`@("!M>6]P96X`("`@("`@("!D0
  1210. M8RYL("`@(&UY8VQO<V4`("`@("`@("!D8RYL("`@(&UY97AP=6YG90`@("`@\
  1211. M("`@(&1C+FP@("`@)#`P,#```"-I;F-L=61E(#QE>&5C+W1Y<&5S+F@^`"-I1
  1212. M;F-L=61E(#QE>&5C+VYO9&5S+F@^`"-I;F-L=61E(#QE>&5C+W)E<VED96YTM
  1213. M+F@^`"-I;F-L=61E(#QE>&5C+VQI8G)A<FEE<RYH/@``(VEN8VQU9&4@/&9U:
  1214. M;F-T:6]N<RYH/@``='EP961E9B!,3TY'("@J4$9,*2@I.R`@("`@("\J('!OT
  1215. M:6YT97(@=&\@9G5N8W1I;VX@<F5T=7)N:6YG(#,R+6)I="!I;G0@*B\``"\J7
  1216. M(&QI8G)A<GD@:6YI=&EA;&EZ871I;VX@=&%B;&4L('5S960@9F]R($%55$])+
  1217. M3DE4(&QI8G)A<FEE<R`@("`@("`@("`@("`@("`@("`@*B\`<W1R=6-T($EN=
  1218. M:71486)L92![`"`@("!53$].1R`@(&ET7T1A=&%3:7IE.R`@("`O*B!L:6)RS
  1219. M87)Y(&1A=&$@<W!A8V4@<VEZ92`@("`@("`@("`J+P`@("`@4$9,("`@("`J2
  1220. M:71?1G5N8U1A8FQE.R`@+RH@=&%B;&4@;V8@96YT<GD@<&]I;G1S("`@("`@P
  1221. M("`@("`@*B\`("`@($%05%(@("`@:71?1&%T84EN:70[("`@("\J('1A8FQE6
  1222. M(&]F(&1A=&$@:6YI=&EA;&EZ97)S("`@("`@("HO`"`@("!01DP@("`@(&ET^
  1223. M7TEN:71&=6YC.R`@("`O*B!I;FET:6%L:7IA=&EO;B!F=6YC=&EO;B!T;R!RV
  1224. M=6X@("`J+P!].P``<W1R=6-T($UY0F%S92![`"`@("!S=')U8W0@($QI8G)A$
  1225. M<GD@;6)?3&EB.P`@("`@54Q/3D<@("!M8E]#;V]K:64[("`@("`@+RH@;&]OV
  1226. M:W,@9V]O9"`@("`@("`@("`@("`@("`@("`@("`@*B\`("`@(%5,3TY'("`@%
  1227. M;6)?4V5G3&ES=#L`("`@(%5,3TY'("`@;6)?1FQA9W,[`"`@("!!4%12("`@V
  1228. M(&UB7T5X96-"87-E.R`@("`O*B!P;VEN=&5R('1O(&5X96,@8F%S92`@("`@F
  1229. M("`@("`@("`J+P`@("`@05!44B`@("!M8E]!-#L@("`@("`@("`@+RH@<')OX
  1230. M<&5R('9A;'5E(&]F($$T(&9O<B!A>G1E8R!S;6%L;"!M;V1E;"`J+P!].P`@G
  1231. M("`@("`@(&EN8VQU9&4@)V5X96,O='EP97,N:2<`("`@("`@("!I;F-L=61EV
  1232. M("=E>&5C+VQI8G)A<FEE<RYI)P``("`@("`@("!,24))3DE4````<W1O<F4@N
  1233. M("!M86-R;P`@("`@("`@(&UO=F5M+FP@9#(M9#<O83(M834L<V%F96ME97``#
  1234. M("`@("`@("!E;F1M``!R971R:65V92!M86-R;P`@("`@("`@(&UO=F5M+FP@:
  1235. M<V%F96ME97`L9#(M9#<O83(M834`("`@("`@("!E;F1M```@("`@("`@(&1S.
  1236. M96<``'-A9F5K965P.@`@("`@("`@(&1C8BYL(#$T("`@("`[(')E<V5R=F4@I
  1237. M<V]M92!S<&%C92!F;W(@=&5M<&]R87)Y(')E9VES=&5R('-T;W)A9V4``"`@D
  1238. M("`@("`@8W-E9P``("`@("`@("`[("TM+2!X<F5F(&9R;VT@87!P;&EC871I$
  1239. M;VX`("`@("`@("!P=6)L:6,@(%]L:6)B87-E```@("`@("`@(#L@+2TM('ADK
  1240. M968@9F]R(&%P<&QI8V%T:6]N"@`@("`@("`@(&1C+FP@("`@)&9F9F9F9F9FE
  1241. M```@("`@("`@(&-S96<``"`@("`@("`@.RTM+2!L:6)R87)Y(&9U;F-T:6]N_
  1242. M<P`@("`@("`@('!U8FQI8R`@7VUY3W!E;@`@("`@("`@('!U8FQI8R`@7VUY-
  1243. M0VQO<V4`("`@("`@("!P=6)L:6,@(%]M>45X<'5N9V4`3E4``!`M``E(@#\`&
  1244. M3KH`*E1/2D!F%!`M``E(@%)`0>R&L@@P``(``&<*$"T`"4B`3EU.=7``8/A.;
  1245. M50``$"T`"4B`4D!![(:R$C```,(\``-F"`PM`%\`"68$<`%@`G``3EU.=4Y5J
  1246. M__Q*+0`-9@XO+0`(3KH`6%A/3EU.=2\M``A.N@!*6$](P-"M``A3@"M`__Q@/
  1247. M&B!M__P0$+`M``UF"B`M__R0K0`(8,Y3K?_\(&W__+'M``ADW'#_8+P@;P`$>
  1248. M(`@B;P`($-EF_$YU(&\`!"`(2AAF_)'`(`A3@$YU3E4``"\*)&T`""!2L>H`?
  1249. M!&4,+PIA%EA/)%].74YU(%)2DA`02(#`?`#_8.Q.50``2.<(,"1M``@0*@`,K
  1250. MP#P`&&<*</],WPP03EU.=0BJ``(`#$JJ``AF""\*3KH/<EA/$"H`#$B`"```2
  1251. M!V<P0>R'-"9($"L`#$B`P'P`A+!\`(1F##\\__\O"TZZ#BI<3]?\````%D'L9
  1252. MB.RWR&76/RH`$"\J``@0*@`-2(`_`$ZZ`M8X`$I`4$]N%$I$9@1P"&`"<!"!L
  1253. M*@`,</]@`/]Z,`1(P"2J``C0J@`()4``!"!24I(0$$B`P'P`_V``_UI.50``0
  1254. M+PI.N@ZB)$!*@&8(<``D7TY=3G4O"B\M``PO+0`(809/[P`,8.A.50``2.<(&
  1255. M("\M`!!.N@T,0>R&:B1(6$]*$F80.7P`!9;&<`!,WP003EU.=2!*(FT`#!`8/
  1256. ML!EF!$H`9O:0(4B`9P1<BF#2/RH`!"\M``A.N@#8.`"P?/__7$]F!'``8,0@Q
  1257. M;0`0$40`#2!M`!`1?``!``P@+0`08*Q.50``*6T`"(CV2&T`$"\M``Q(>@`.[
  1258. M3KH("D_O``Q.74YU3E4``"\LB/8_+0`(3KH+S%Q/3EU.=4Y5```O"B1M``H,]
  1259. M;?__``AG""!2L>H`"&((</\D7TY=3G53DB!2$*T`"3`M``A@[#`\?_]@!#`O\
  1260. M``Q30&L4(&\`!")O``BQ"68,4TA*&%?(__9P`$YU8P1P`4YU</].=4Y5```_I
  1261. M+0`,/SP#`2\M``AA!E!/3EU.=4Y5``!(YP\P)&T`"$ZZ#ZPF;);(>`!@#C`$'
  1262. MP?P`!DJS"`!G#E)$N&R([&WL>@9@``#$""T``0`,9S!(>/__+PI.NA&8+`!0E
  1263. M3V<@+P9.NA'0+PI.NA%>2H!03V8.3KH1:#H`L'P`S68``(Q(>`/M+PI.NA%V?
  1264. M+`!*AE!/9F`(+0````QF!'H!8&Q(>`/N+PI.NA%8+`!03V8(3KH1+#H`8%1(B
  1265. M>``A2'H`DDZZ$?0N`%!/9PHO!TZZ$9Y83V`>2'@``4AZ`((O!DZZ$6)(>/__]
  1266. M0J<O!DZZ$3A/[P`88"8P+0`,P'P%`+!\!0!F&"\&3KH0K'H$6$\Y19;&</],7
  1267. MWPSP3EU.=3`$P?P`!B>&"``P!,'\``8@0-'+,6T`#``$""T``P`,9Q!(>``!2
  1268. M0J<O!DZZ$-Y/[P`,,`1@PF1O<RYL:6)R87)Y````3E4``$CG#"`X+0`(3KH.>
  1269. M9C`$P?P`!B1`U>R6R$I$;0JX;(CL;`1*DF80.7P``I;&</],WP0P3EU.=3`JH
  1270. M``3`?``#L'P``68*.7P`!9;&</]@X'``,"T`#B\`+RT`"B\23KH05BH`L+S_9
  1271. M____3^\`#&8,3KH0##E`EL9P_V"T(`5@L$Y5```O"B1M``A*$F<@($I2BA`0H
  1272. M2(`_`$ZZ"52P?/__5$]F"'#_)%].74YU8-P_/``*3KH).E1/8.QA<$/LB/9%%
  1273. M[(CVM<EF#C(\`X9K"'0`(L)1R?_\*4^6S"QX``0I3I;02.>`@`@N``0!*6<0<
  1274. M2_H`"$ZN_^)@!D*G\U].<T/Z`"!.KOYH*4"6U&8,+CP``X`'3J[_E&`$3KH`_
  1275. M&E!/3G5D;W,N;&EB<F%R>0!)^0``?_Y.=4Y5```O"DAY``$``#`LB.S!_``&8
  1276. M+P!.N@_,*4"6R%!/9A1"ITAY``$``$ZZ#Y!03RYLELQ.=2!LELA":``$(&R6<
  1277. MR#%\``$`$"!LEL@Q?``!``H@;);,("R6S)"H``10@"E`EM@@;);8(+Q-04Y8Q
  1278. M0J=.N@^`)$!*J@"L6$]G+B\M``PO+0`(+PI.N@"N.7P``9;<(&R6R`!H@```U
  1279. M!"!LEL@`:(````I/[P`,8$)(:@!<3KH/FDAJ`%Q.N@]<*4"6WB!LEMY*J``D_
  1280. M4$]G$"!LEMXB:``D+Q%.N@Y26$\O+);>+PI.N@)H*6R6WI;B4$].N@Y2(&R6W
  1281. MR""`3KH.@"!LEL@A0``&9Q9(>`/M2'H`*DZZ#EP@;);((4``#%!/+RR6XC\L.
  1282. MEN9.NM("0F=.N@QL4$\D7TY=3G4J`$Y5``!(YPPP)&T`$"!M``A*J`"L9Q@@\
  1283. M;0`(("@`K.6`*``@1"`H`!#E@"9`8`0F;(CN$!-(@$C`T*T`#%2`.4"6Z$*G9
  1284. M,"R6Z$C`+P!.N@Y>*4"6ZE!/9@A,WPPP3EU.=1`32(`Z`#\%($M2B"\(+RR6F
  1285. MZDZZ`7XP!4C`($#1[);J0_H!1!#99OP_+0`.+PHO+);J3KH!.B!LENI",%``W
  1286. M.7P``9;F,`5(P-"LENHF0%*+)$M/[P`4$!-(@#H`L'P`(&<8NGP`"6<2NGP`-
  1287. M#&<,NGP`#6<&NGP`"F8$4HM@V`P3`"!M>@P3`")F+E*+($M2BQ`02(`Z`&<>U
  1288. M($I2BA"%NGP`(F80#!,`(F8$4HM@!D(J__]@`F#68#@@2U*+$!!(@#H`9R:ZB
  1289. M?``@9R"Z?``)9QJZ?``,9Q2Z?``-9PZZ?``*9P@@2E**$(5@SB!*4HI"$$I%W
  1290. M9@)3BU)LEN9@`/]:0A)"IS`LEN920$C`Y8`O`$ZZ#3PI0);B4$]F"$)LEN9@%
  1291. M`/[8>@`F;);J8"0P!4C`Y8`@;);B(8L(`"!+(`A*&&;\D<!3B#`(4D!(P-?`L
  1292. M4D6Z;);F;=8P!4C`Y8`@;);B0K`(`&``_I0@`#`\?_]@!#`O``P@;P`$2AAF"
  1293. M_%-((F\`"%-`$-E7R/_\9P)"$"`O``1.=4SO`P``!"`(,B\`#&`"$-E7R?_\4
  1294. M9P9206`"0AA1R?_\3G5.50``2.<.,"1M``A"ITAZ`(Y.N@S"*4"6[E!/9@A,2
  1295. MWPQP3EU.=2!M``PB:``D+RD`!$ZZ#/(H`%A/9U)(>@!M($0O*``V3KH,Q"9`8
  1296. M2H!03V<T2'@#[2\+3KH+QBP`4$]G)"`&Y8`J`"!%)6@`"`"D)48`G$AX`^U(O
  1297. M>@`X3KH+HB5``*!03R\$3KH,D%A/+RR6[DZZ"_1"K);N6$]@@&EC;VXN;&EBV
  1298. M<F%R>0!724Y$3U<`*@!.50``+P0I;0`(B/I(;0`0+RT`#$AZ`!I.N@#<.``@[
  1299. M;(CZ0A`P!$_O``PH'TY=3G5.50``(&R(^E*LB/H0+0`)$(!(@,!\`/].74YUK
  1300. M3E4``$AM``PO+0`(2'H$8$ZZ`)A/[P`,3EU.=4Y5``!(YP@@)&T`#@QM``0`<
  1301. M$F8((&T`""@08!Q*;0`,;PP@;0`(<``P$"@`8`H@;0`(,!!(P"@`0FT`$DIM;
  1302. M``QL$$1M``Q*A&P(1(0[?``!`!(R+0`,2,$@!$ZZ`Y!![(:@4XH4L```,BT`?
  1303. M#$C!(`1.N@.&*`!FVDIM`!)G!E.*%+P`+2`*3-\$$$Y=3G5.5?\B2.<(,"1M5
  1304. M``@F;0`,0FW_^BMM`!#__"!+4HL0$$B`.`!G``+NN'P`)68``LQ"+?\P.WP`3
  1305. M`?_X.WP`(/_V.WPG$/_T($M2BQ`02(`X`+!\`"UF#D)M__@@2U*+$!!(@#@`H
  1306. MN'P`,&80.WP`,/_V($M2BQ`02(`X`+A\`"IF&"!M__Q4K?_\.U#_\B!+4HL02
  1307. M$$B`.`!@,D)M__)@'#`M__+!_``*T$20?``P.T#_\B!+4HL0$$B`.``P!%)`]
  1308. M0>R&L@@P``(``&;4N'P`+F9:($M2BQ`02(`X`+!\`"IF&"!M__Q4K?_\.U#_%
  1309. M]"!+4HL0$$B`.`!@,D)M__1@'#`M__3!_``*T$20?``P.T#_]"!+4HL0$$B`1
  1310. M.``P!%)`0>R&L@@P``(``&;4.WP``O_PN'P`;&82($M2BQ`02(`X`#M\``3_Y
  1311. M\&`0N'P`:&8*($M2BQ`02(`X`#`$2,!@>CM\``C_[F`6.WP`"O_N8`X[?``0O
  1312. M_^Y@!CM\__;_[C\M__!(;?\P/RW_[B\M__Q.NOWD*T#_ZC`M__!(P-&M__Q/T
  1313. M[P`,8%P@;?_\6*W__")0*TG_ZB`)2AEF_)/`4XD[2?_P8$H@;?_\5*W__#@04
  1314. M0>W_+RM(_^H0A&`HD+P```!C9^)3@&>2D+P````+9P#_<EF`9[)5@&<`_W!7[
  1315. M@&<`_W)@S$'M_S"1[?_J.TC_\#`M__"P;?_T;P8[;?_T__!*;?_X9V@@;?_J(
  1316. M#!``+6<*(&W_Z@P0`"MF+@QM`##_]F8F4VW_\B!M_^I2K?_J$!!(@#\`3I*P[
  1317. M?/__5$]F"G#_3-\,$$Y=3G5@%C\M__9.DK!\__]43V8$</]@Y%)M__HP+?_R8
  1318. M4VW_\K!M__!NW$)M_^Y@("!M_^I2K?_J$!!(@#\`3I*P?/__5$]F!'#_8+!20
  1319. M;?_N(&W_ZDH09PHP+?_NL&W_]&W.,"W_[M%M__I*;?_X9BA@&#\\`"!.DK!\,
  1320. M__]43V8&</]@`/]X4FW_^C`M__)3;?_RL&W_\&[:8!8_!$Z2L'S__U1/9@9P@
  1321. M_V``_U)2;?_Z8`#]"#`M__I@`/]"2.=(`$*$2H!J!$2`4D1*@6H&1($*1``!B
  1322. M83Y*1&<"1(!,WP`22H!.=4CG2`!"A$J`:@1$@%)$2H%J`D2!81H@`6#8+P%A4
  1323. M$B`!(A]*@$YU+P%A!B(?2H!.=4CG,`!(04I!9B!(038!-`!"0$A`@,,B`$A`*
  1324. M,@*"PS`!0D%(04S?``Q.=4A!)@$B`$)!2$%(0$)`=`_0@-.!MH%B!)*#4D!14
  1325. MRO_R3-\`#$YU3E4``$ALATH_+0`(3KH`"%Q/3EU.=4Y5```O!#@M``@O+0`*C
  1326. M/P1.N@`PN'P`"EQ/9B0@;0`*$"@`#$B`"```!V<4/SS__R\M``I.N@#T7$\H)
  1327. M'TY=3G5@^$Y5```O"B1M``H@4K'J``1E&#`M``C`?`#_/P`O"DZZ`,A<3R1?`
  1328. M3EU.=2!24I(0+0`)$(!(@,!\`/]@Z$Y5```O"D'LAS0D2"!*U?P````6+PAA^
  1329. M$%A/0>R([+7(9>HD7TY=3G5.50``2.<(("1M``AX`"`*9@IP_TS?!!!.74YU6
  1330. M2BH`#&=0""H``@`,9PP_//__+PIA4C@`7$\0*@`-2(`_`$ZZ!1R(0`@J``$`D
  1331. M#%1/9PHO*@`(3KH"+EA/""H`!0`,9Q(O*@`23KH"P"\J`!).N@(44$]"DD*JY
  1332. M``1"J@`(0BH`##`$8)!.5?_^2.<(("1M``A!^O]&*4B6\@@J``0`#&<*</],+
  1333. MWP003EU.=0@J``(`#&<P(%*1Z@`(.`@_!"\J``@0*@`-2(`_`$ZZ`H"P1%!/\
  1334. M9Q`(Z@`$``Q"DD*J``1P_V#`#&W__P`,9A`(J@`"``Q"DD*J``1P`&"H2JH`U
  1335. M"&8(+PI.N@":6$\,:@`!`!!F*AMM``W__S\\``%(;?__$"H`#4B`/P!.N@(B+
  1336. ML'P``5!/9J`P+0`,8`#_:B2J``@P*@`02,#0J@`()4``!`CJ``(`#"!24I(0=
  1337. M+0`-$(!(@,!\`/]@`/\^3E4``"\*0>R'-"1(2BH`#&<8U?P````60>R([+7(>
  1338. M90AP`"1?3EU.=6#B0I)"J@`$0JH`""`*8.I.5?_\+PHD;0`(/SP$`$ZZ`,`K>
  1339. M0/_\5$]F\``$`$"!*T?P````.)4@`""1?3EU.=35\!```$`CJ``$`#"5M?
  1340. M__P`"!`J``U(@#\`3KH`XDI`5$]G!@`J`(``#&#.3E4``$CG`#`D;(C^8!0FK
  1341. M4B`J``10@"\`+PI.N@1X4$\D2R`*9NA"K(C^3-\,`$Y=3G5.50``+PI!^O_&7
  1342. M*4B6]D*G("T`"%"`+P!.N@0F)$!*@%!/9@AP`"1?3EU.=22LB/XE;0`(``0IE
  1343. M2HC^(`I0@&#F3E4``'``,"T`""\`8;)83TY=3G5.50``2.<`,)?+)&R(_F`.'
  1344. M(&T`"%&(L<IG$B9*)%(@"F;N</],WPP`3EU.=2`+9P0FDF`$*5*(_B`J``10K
  1345. M@"\`+PI.N@/*<`!03V#83E4``"\*,"T`",'\``8D0-7LELA*;0`(;0XP+0`(J
  1346. ML&R([&P$2I)F#CE\``*6QG#_)%].74YU,"T`",'\``8@;);(+S`(`$ZZ`L9*6
  1347. M@%A/9P1P`6`"<`!@V$Y5```O+0`(3KH"D$J`6$]F#DZZ`IHY0);&</].74YUI
  1348. M<`!@^$Y5``!(YPP@."T`"$ZZ`'`P!,'\``8D0-7LELA*1&T*N&R([&P$2I)FT
  1349. M$#E\``*6QG#_3-\$,$Y=3G4P*@`$P'P``V8*.7P`!9;&</]@Y'``,"T`#B\`_
  1350. M+RT`"B\23KH"D"H`L+S_____3^\`#&8,3KH"&CE`EL9P_V"X(`5@M$Y5__Q(N
  1351. M>!``0J=.N@+T*T#__`@```Q03V<22FR6W&8(("W__$Y=3G5.N@`&<`!@]$Y5"
  1352. M``!(>``$2'H`'$ZZ`?XO`$ZZ`BP_/``!3KH`#D_O``Y.74YU7D,*`$Y5``!*R
  1353. MK);R9P8@;);R3I`_+0`(3KH`"%1/3EU.=4Y5__PO!#`M``A(P"M`__Q*K);(@
  1354. M9RAX`&`*/P1.N@#^5$]21+ALB.QM\#`LB.S!_``&+P`O+);(3KH"%E!/2JR6N
  1355. M]F<&(&R6]DZ02JR(\F<*+RR(\DZZ`9)83TJLEOIG""!LEOH@K);^2JR7`F<*"
  1356. M+RR7`DZZ`:Y83TJLEP9G"B\LEP9.N@&>6$]*K)<*9PHO+)<*3KH!CEA/2JR7K
  1357. M#F<*+RR7#DZZ`7Y83RQX``0(+@`$`2EG%"\-2_H`"DZN_^(J7V`&0J?S7TYS'
  1358. M2JR6WF8P2JR6ZF<H,"R6Z$C`+P`O+);J3KH!;C`LEN920$C`Y8`O`"\LEN)./
  1359. MN@%:3^\`$&`.3KH!2"\LEMY.N@%T6$\@+?_\+FR6S$YU*!].74YU3E4``$CGC
  1360. M#B`X+0`(,`3!_``&)$#5[);(2D1M"KALB.QL!$J29A`Y?``"EL9P_TS?!'!.C
  1361. M74YU""H`!P`$9@@O$DZZ``I83T*2<`!@XB(O``0L;);43N[_W"(O``0L;);40
  1362. M3N[_@B(O``0L;);43N[_N"QLEM1.[O_*+&R6U$[N_WPB+P`$+&R6U$[N_RA,-
  1363. M[P`&``0L;);43N[_K$SO``8`!"QLEM1.[O_B+&R6U$[N_\1,[P`.``0L;);46
  1364. M3N[_UDSO``X`!"QLEM1.[O^^3OH``B(O``0L;);43N[_IDSO``X`!"QLEM1.X
  1365. M[O_02.<!!$SO((``#"QLEM!.KO^43-\@@$YU3OH``B)O``0L;);03N[^8DSOG
  1366. M``,`!"QLEM!.[O\Z(F\`!"QLEM!.[O[:+&R6T$[N_WPB;P`$("\`""QLEM!..
  1367. M[O\N(&\`!"QLEM!.[OZ,+&R6T")O``0@+P`(3N[]V")O``0L;);03N[^ADSO[
  1368. M``,`!"QLEM!.[O[.(&\`!"QLEM!.[OZ`3.\#```$+&R6[D[N_Z`@;P`$+&R62
  1369. M[D[N_Z8@;P`$+&R6[D[N_[(``````^P````!`````0``/P8````````#\@``6
  1370. M`^H```(]```````````````$````!P````H````-````$````!,````6````'
  1371. M&0```!P````?````(@```"4````H````*P```````!+(```2\0``$Q0``!,6;
  1372. M```37@``$Z0``!.F```3[```%#(``!1)```42@``%%0````````45@``%',`Z
  1373. M`!1T```4D0```````!2X```4N0``%-```!31```4V0``%.<``!3W```5#P``F
  1374. M%2$``!4B```5*P``%3D``!5)```58@``%70``!5U```5@```%8X``!6>```5C
  1375. MN0``%<L````````5S```%?$``!84```6%@``%EX``!:D```6I@``%NP``!<R+
  1376. M```720``%TL````````73```%T\``!=U```7F0``%YH``!?C```8*@``&"L`W
  1377. M`!AR```8N0``&-$``!C4````````&-8``!C=```9$0``&1,``!D4```9-@``E
  1378. M&5$``!EL```9@P``&80``!FQ```9L@``&?0``!HV```:6@``&EL``!I<```:3
  1379. M;@``&F\``!JO```:M@``&M$``!K=```:W@``&O,``!KT```;'P``&R```!M0E
  1380. M```;B@``&Z```!OF```;YP``'#(``!QS```<P```',$``!S<```=*0``'44`9
  1381. M`!UA```=J0``'>H``!X8```>4```'F8``!YK```>I0``'KT``!Z^```>Q```8
  1382. M'P,``!\T```?0@``'XP``!_5```@%@``(!<``"!7```@AP``(,D``"$&```AQ
  1383. M!P``(3(``"%F```A9P``(7X``"&&```AH```(:P``"&M```AN@``(;L``"&\?
  1384. M```AU@``(=<``"'R```B"P``(C8``"(W````````(D0``")?```B8```(H``K
  1385. M`"*C```BPP``(N<``"+H```C`@``(QP``",=```C30``(TX``"-G```C?@``M
  1386. M(YH``".;```CK@``(\D``"/4```C\P``)`X``"0F```D1```)%\``"1[```DO
  1387. MD@``)*L``"3"```DW@``).8``"3G````````)/0``"4L```E:```)8H``"6.V
  1388. M```EH0``);(``"6S```F!@``)E$``"92```F9P``)F@``":(```FJ```)KP`)
  1389. M`"<?```G,0``)S0``"<U```GD```)Y$``">G```GNP``)[P``"?>```GWP``B
  1390. M)^(``"@G```H<```*'D``"A]```H?@``*(,``"B?```HN0``*-H``"C<```I>
  1391. M"0``*0H``"DE```I/0``*9@``"F\```IO0``*A```"I$```J?0``*KL``"KS-
  1392. M```K(P``*U0``"M5```KD```*Y(``"N3```KF```*\L``"OA```KXP``+#8`X
  1393. M`"Q:```L6P``+*8``"S6```LUP``+/4``"SW```L^```+/T``"T+```M(0``[
  1394. M+2,``"T_```M0```+7$``"VQ```MNP``+>L``"XC```N-P``+GH``"Z$```NC
  1395. MA0``+IX``"Z@```NH0``+J8``"ZV```NS0``+L\``"[\```O)0``+R8``"]1Q
  1396. M```O6P``+YX``"^?```ORP``+\P``"_J```OZP``,#H``#"-```PEP``,*0`/
  1397. M`#"N```PY0``,.\``##P```P\0``,1L``#$\```Q/@```````#%````Q7P``\
  1398. M,6```#%N```QE@``,:T``#&Z```QNP``,<D``#'B```Q[P``,?```#'^```R;
  1399. M%@``,BP``#(Y```R3@``,FT``#)Z```RCP``,K$``#*^```RRP``,LP``#+:%
  1400. M```R[0``,Q4``#,A```S+@``,R\``#,\```S/0``,UD``#-F```S?0``,Y4`Z
  1401. M`#.O````````,\8``#/>```S]@``-!$``#0M```T+@``-$4``#1&```TD0``5
  1402. M-)(``#3E```T^```-3L``#5^```UP0``-@0``#8'```V"```-A@``#8T```V'
  1403. M=P``-H\``#:E```VZ```-S,````````W-@``-U4``#=X```W>0```````#>*X
  1404. M```WBP``-YD``#>^```WRP``-\P``#?;```X````.`T``#@.```X&P``.!P`(
  1405. M`#@F```X;P``.'```#A]```X?@``.*(``#B[```XO````````#C@```X^@``C
  1406. M./L``#D(```Y"0``.2@``#E````Y60````!R``````!R*P````)W`````P%WE
  1407. M*P```P)A````"0%A*P``"0)X````!0%X*P``!0(````````P,3(S-#4V-S@YG
  1408. M86)C9&5F````("`@("`@("`@,#`P,#`@("`@("`@("`@("`@("`@(""00$!`U
  1409. M0$!`0$!`0$!`0$!`#`P,#`P,#`P,#$!`0$!`0$`)"0D)"0D!`0$!`0$!`0$!X
  1410. M`0$!`0$!`0$!`4!`0$!`0`H*"@H*"@("`@("`@("`@("`@("`@("`@("0$!`N
  1411. M0"```````````````````0`````!``````````````````````$!`````0``E
  1412. M```````````````````!`@````$`````````````````````````````````$
  1413. M`````````````````````````````````````````````````````````````
  1414. M`````````````````````````````````````````````````````````````
  1415. M`````````````````````````````````````````````````````````````
  1416. M`````````````````````````````````````````````````````````````
  1417. M`````````````````````````````````````````````````````````````
  1418. M`````````````````````````````````````````````````````````````
  1419. M`````````````````````````````````````````````````````````````
  1420. M````````````````````````````````````````````````````%```````4
  1421. M```````#[````8H`````````"`````P````0````%````!@````<````(```&
  1422. M`"0````H````+````#`````T````.````#P```!$````2````$P```!0````X
  1423. M5````%@```!<````8````&0```!H````;````'````!X````?````(````"$(
  1424. M````C````)````"4````F````)P```"@````I````*@```"L````L````+0`@
  1425. M``"X````O````,````#$````R````,P```#0````U````-@```#<````Y```(
  1426. M`.@```#L````\````/0```#X````_````0````$$```!"````0P```$4```!>
  1427. M&````1P```$@```!)````2@```$L```!,````30```$X```!/````4````%(W
  1428. M```!3````5````%4```!6````5P```%@```!9````6@```%L```!<````70`K
  1429. M``%X```!?````8````&$```!B````8P```&0```!E````9@```&<```!H```/
  1430. M`:0```&H```!K````;````&T```!N````;P```'````!Q````<@```',```!T
  1431. MT````=0```'8```!W````>````'D```!Z````>P```'P```!]````?@```'\3
  1432. M```"`````@0```((```"#````A````(4```"&````AP```(@```")````B@`R
  1433. M``(L```",````C0```(X```"/````D````)$```"2````DP```)0```"5```6
  1434. M`E@```)<```"8````F0```)H```";````G````)T```">````GP```*````"\
  1435. MA````HP```*0```"E````I@```*<```"H````J0```*H```"K````K````*TZ
  1436. M```"N````KP```+````"Q````L@```+,```"T````M0```+8```"W````N``:
  1437. M``+D```"Z````NP```+P```"]````O@```+\```#`````P0```,(```#$```&
  1438. M`Q0```,8```#'````R````,D```#*````RP```,P```#-````S@```,\```#<
  1439. M0````T0```-(```#3````U````-4```#6````UP```-@```#9````V@```-LI
  1440. M```#<````W0```-X```#?````X````.$```#B````XP```.0```#E````Y@`-
  1441. M``.<```#H````Z0```.H```#K````[````.T```#N````[P```/````#Q```Q
  1442. M`\@```/,```#T````]0```/8```#W````^````/D```#Z````^P```/P```#8
  1443. M]````_@```/\```$````!`0```0(```$#```!!````04```$&```!!P```0@B
  1444. M```$)```!"@```0L```$,```!#0```0X```$/```!$````1$```$2```!$P`4
  1445. M``10```$5```!%@```1<```$8```!&0```1H```$;```!'````1T```$>```X
  1446. M!'P```2````$A```!(@```2,```$D```!)0```28```$G```!*````2D```$@
  1447. MJ```!*P```2P```$M```!+@```2\```$P```!,0```3(```$S```!-````344
  1448. M```$W```!.````3D```$Z```!.P```3P```$]```!/@```3\```%````!00`^
  1449. M``4(```%#```!1````44```%&```!1P```4@```%)```!2@```4L```%,```K
  1450. M!30```4X```%/```!4````5$```%2```!4P```50```%5```!5@```5<```%4
  1451. M8```!60```5H```%;```!70```5X```%?```!8````6$```%B```!8P```60?
  1452. M```%E```!9@```6<```%H```!:0```6H```%K```!;````6T```%N```!;P`O
  1453. M``7````%Q```!<@```7,```%T```!=0```7<```%X```!>0```7H```%\```K
  1454. M!?0```7X```%_```!@````8$```&"```!@P```80```&%```!A@```8<```&=
  1455. M(```!B0```8H```&+```!C````8T```&.```!CP```9$```&2```!DP```90:
  1456. D```&5```!E@```9<```&8`````````/R```#ZP````$```/R9
  1457. ``
  1458. end
  1459. size 24336
  1460. SHAR_EOF
  1461. cat << \SHAR_EOF > readme
  1462. Mklib                   Copyright 1988 Edwin Hoogerbeets
  1463. Version 1.0             12/08/88
  1464.  
  1465. Some time ago, I started a project that was to use an Amiga shared library
  1466. for some of its functions. Unfortunately, almost all libraries before this
  1467. were written in assembler, and mine were written in C. So after some
  1468. searching, some kind soul (I forgot who, sorry) told me of elib of Fish 87.
  1469. I played with that and got it working. (Thanks, Jimm!) What I wanted,
  1470. though, was to write my routines in C and not fiddle with the assembler
  1471. interface, etc. So, I decided to write mklib and keep my fiddling with the
  1472. assembler to this one session. (thud thud <- knock on wood)
  1473.  
  1474. I know the scanner/parser is a kludge: it was quick and dirty. But it
  1475. works. Some assumptions are made about the C code: that the number of {
  1476. matches the number of } in a functions, that declarations only occur when
  1477. the numbers of { and }'s are equal, that the only valid functions are LONG
  1478. or ULONG and that everything else is rubbish.
  1479.  
  1480. I don't own the Lattice C compiler, so this code is not guaranteed to work
  1481. with it. If someone out there who does have Lattice hacks it into useable
  1482. code, please send me your changes and I will incorperate them into the next
  1483. (?) release.
  1484.  
  1485. Now the default stuff:
  1486.  
  1487. This software is freely redistributable as long as there is no charge
  1488. beyond resonable copy fees and as long as this notice stays intact.
  1489.  
  1490. Thanks to Jimm Mackraz for Elib on Fish 87, from which much of this program
  1491. is lifted. Also thanks to Neil Katin for his mylib.asm upon which elib is
  1492. based.
  1493.  
  1494. My address is:
  1495.  
  1496. Work:  {backbone}!utai!utcsri!hcr!edwin            Until Sept. 88
  1497. School:{backbone}!watmath!trillium!ehoogerbeets    From Sept. to Dec. 88
  1498.  
  1499. (In Jan-Apr, back to work, then to school, every 4 months, etc...)
  1500.  
  1501. Now back to my original project that needed this library...
  1502. (it's like, properly nested projects, ya know)
  1503.  
  1504. SHAR_EOF
  1505. cat << \SHAR_EOF > t.c
  1506. #include <exec/types.h>
  1507. #include <stdio.h>
  1508. #include <functions.h>
  1509. #include "link.h"
  1510.  
  1511. #define RTC printf("return to continue - ");fflush(stdout);\
  1512. getchar();
  1513.  
  1514. #define DOUBARG 19
  1515.  
  1516. main()
  1517. {
  1518.         LONG    retval;
  1519.  
  1520.         printf("here we go\n");
  1521.         libbase = (APTR) OpenLibrary("mylib.library", 0L);
  1522.         printf("openlib returns base: %lx\n", libbase);
  1523.  
  1524.         RTC;
  1525.  
  1526.         if (libbase)
  1527.         {
  1528.                 /* test function GetDown()      */
  1529.                 retval = GetDown();
  1530.                 printf("called getdown, %ld returned\n", retval);
  1531.                 RTC;
  1532.  
  1533.                 /* test function Double()       */
  1534.                 printf("double of %d = %ld\n", DOUBARG, Double((LONG)DOUBARG));
  1535.                 RTC;
  1536.  
  1537.                 /* test function Triple()       */
  1538.                 printf("Here is three times %d: %ld\n",DOUBARG,
  1539.                         Triple((LONG)DOUBARG));
  1540.                 RTC;
  1541.  
  1542.                 printf("Here is 12+13: %ld\n",Add((LONG)12,(LONG)13));
  1543.  
  1544.                 printf("Here is 1+2+3+4+5+6: %ld\n", Sum ( (LONG)1,
  1545.                         (LONG)2, (LONG)3, (LONG)4, (LONG)5, (LONG)6));
  1546.  
  1547.                 CloseLibrary(libbase);
  1548.         }
  1549. }
  1550. SHAR_EOF
  1551. cat << \SHAR_EOF > text.c
  1552. /*
  1553.     Mklib 1.0 - a source file generator for Amiga shared libraries
  1554.     Compiled with Manx v3.6a small code model/16 bit int. (see makefile)
  1555.  
  1556.     copyright 1988 Edwin Hoogerbeets
  1557.  
  1558.     This software and the files it produces are freely redistributable
  1559.     as long there is no charge beyond reasonable copy fees and as long
  1560.     as this notice stays intact.
  1561.  
  1562.     Thanks to Jimm Mackraz for Elib on Fish 87, from which much of this
  1563.     program is lifted. Also thanks to Neil Katin for his mylib.asm upon
  1564.  
  1565. */
  1566. #include <stdio.h>
  1567. #include <ctype.h>
  1568. #include <edlib.h>
  1569.  
  1570. char *makeheader[] = {
  1571.     "# This makefile was generated with mklib",
  1572.     "# copyright 1988 Edwin Hoogerbeets",
  1573.     "#",
  1574.     "# This software is freely redistributable as long as there is no charge",
  1575.     "# beyond resonable copy fees and as long as this notice stays intact.",
  1576.     "#",
  1577.     "# Thanks to Jimm Mackraz for Elib on Fish 87, from which much of this",
  1578.     "# program is lifted. Also thanks to Neil Katin for his mylib.asm upon",
  1579.     "# which elib is based.",
  1580.     "",
  1581.     "CFLAGS=-T",
  1582.     "",
  1583.     NULL
  1584. };
  1585.  
  1586. char *makefooter[] = {
  1587.     "        ln $(OBJS) -lc -o $@",
  1588.     "",
  1589.     "#yourprog: yourprog.o link.o",
  1590.     "#       ln yourprog.o link.o -lc -o $@",
  1591.     NULL
  1592. };
  1593.  
  1594. char *facemid[] = {
  1595.     "",
  1596.     "        public  _geta4",
  1597.     "",
  1598.     "myopen:",
  1599.     "        setup",
  1600.     "        push a6",
  1601.     "        jsr     _myOpen",
  1602.     "        restore 4",
  1603.     "",
  1604.     "myclose:",
  1605.     "        setup",
  1606.     "        push a6",
  1607.     "        jsr     _myClose",
  1608.     "        restore 4",
  1609.     "",
  1610.     "myexpunge:",
  1611.     "        setup",
  1612.     "        push a6",
  1613.     "        jsr     _myExpunge",
  1614.     "        restore 4",
  1615.     "",
  1616.     NULL
  1617. };
  1618.  
  1619. char *asmheader[] = {
  1620.     "; This file was generated with mklib",
  1621.     "; copyright 1988 Edwin Hoogerbeets",
  1622.     ";",
  1623.     "; This software is freely redistributable as long as there is no charge",
  1624.     "; beyond resonable copy fees and as long as this notice stays intact.",
  1625.     ";",
  1626.     "; Thanks to Jimm Mackraz for Elib on Fish 87, from which much of this",
  1627.     "; program is lifted. Also thanks to Neil Katin for his mylib.asm upon",
  1628.     "; which elib is based.",
  1629.     ";",
  1630.     "",
  1631.     NULL
  1632. };
  1633.  
  1634. char *cheader[] = {
  1635.     "/*",
  1636.     "   This file was generated with mklib",
  1637.     "   copyright 1988 Edwin Hoogerbeets",
  1638.     "",
  1639.     "   This software is freely redistributable as long as there is no charge",
  1640.     "   beyond resonable copy fees and as long as this notice stays intact.",
  1641.     "",
  1642.     "   Thanks to Jimm Mackraz for Elib on Fish 87, from which much of this",
  1643.     "   program is lifted. Also thanks to Neil Katin for his mylib.asm upon",
  1644.     "   which elib is based.",
  1645.     "*/",
  1646.     "",
  1647.     NULL
  1648. };
  1649.  
  1650. char *startupcode[] = {
  1651.     ";:ts=8",
  1652.     "; Copyright (C) 1986 by Manx Software Systems, Inc.",
  1653.     ";",
  1654.     "",
  1655.     "; ***   But FUNKIFIED by jimm ***",
  1656.     ";       library base in D0",
  1657.     ";       segment list in A0",
  1658.     ";       execbase in A6",
  1659.     "",
  1660.     ";       Initial startup routine for Aztec C.",
  1661.     "",
  1662.     ";       NOTE: code down to \"start\" must be placed at beginning of",
  1663.     ";               all programs linked with Aztec Linker using small",
  1664.     ";               code or small data.",
  1665.     "",
  1666.     "",
  1667.     "a4save  dc.l    0",
  1668.     "",
  1669.     "        public  .begin                  ; just to resolve label",
  1670.     ".begin",
  1671.     "        public  _funkyInit",
  1672.     "_funkyInit:",
  1673.     "",
  1674.     "        near    code",
  1675.     "",
  1676.     "        movem.l d0/d2/d3/d4-d7/a2-a6,-(sp)",
  1677.     "",
  1678.     "        ; FUNKY use a0, not a1 for segment list",
  1679.     "        move.l  a0,a4                   ;BPTR to code seg",
  1680.     "        add.l   a4,a4",
  1681.     "        add.l   a4,a4                   ;now real address of code seg",
  1682.     "",
  1683.     "        move.l  (a4),a4                 ;indirect to get data segment BPTR",
  1684.     "        add.l   a4,a4                   ;convert to real pointer",
  1685.     "        add.l   a4,a4                   ;real address of data seg link field",
  1686.     "",
  1687.     "        ; same as crt0.a68",
  1688.     "        add.l   #32766+4,a4             ;bias appropriately (+4 is for link)",
  1689.     "        lea     __H1_end,a1",
  1690.     "        lea     __H2_org,a2",
  1691.     "        cmp.l   a1,a2                   ;check if BSS and DATA together",
  1692.     "        bne     start                   ;no, don't have to clear",
  1693.     "        move.w  #((__H2_end-__H2_org)/4)-1,d1",
  1694.     "        bmi     start                   ;skip if no bss",
  1695.     "        move.l  #0,d2",
  1696.     "loop",
  1697.     "        move.l  d2,(a1)+                ;clear out memory",
  1698.     "        dbra    d1,loop",
  1699.     "",
  1700.     "start",
  1701.     "        lea     a4save,a1               ;get address of a4save",
  1702.     "        move.l  a4,(a1)                 ;save a4",
  1703.     ";       FUNKY",
  1704.     ";       move.l  sp,__savsp              ;save stack pointer (can't fexec)",
  1705.     ";       move.l  4,a6                    ;get Exec's library base pointer",
  1706.     "        move.l  a6,_SysBase             ;put where we can get it",
  1707.     "",
  1708.     "        movem.l d0/a0,-(sp)             ; pass base and seglist",
  1709.     "        jsr     _funkymain              ; FUNKY",
  1710.     "        addq.l  #8,sp                   ;pop args to  funkymain()",
  1711.     "                                        ; can pop better (?)",
  1712.     "",
  1713.     "        movem.l (sp)+,d0/d2/d3/d4-d7/a2-a6",
  1714.     "        rts                             ;and return",
  1715.     "",
  1716.     "        public  _geta4",
  1717.     "_geta4:",
  1718.     "        move.l  a4save,a4",
  1719.     "        rts",
  1720.     "",
  1721.     "        dseg",
  1722.     "",
  1723.     "",
  1724.     "_SysBase        dc.l    0",
  1725.     "",
  1726.     "        public  _funkymain",
  1727.     "        public  _SysBase",
  1728.     "        public  __H1_end,__H2_org,__H2_end",
  1729.     "",
  1730.     "        end",
  1731.     NULL
  1732. };
  1733.  
  1734. char *rtag[] = {
  1735.     ";       rtag.asm -- romtag",
  1736.     "",
  1737.     "         include 'exec/types.i'",
  1738.     "         include 'exec/resident.i'",
  1739.     "         include 'exec/nodes.i'",
  1740.     "         include 'exec/libraries.i'",
  1741.     "",
  1742.     "MYVERSION       equ     1",
  1743.     "MYPRI           equ     0",
  1744.     "",
  1745.     "         cseg    ; romtag must be in first hunk",
  1746.     "",
  1747.     "         public  _myname",
  1748.     "         public  _myid",
  1749.     "         public  _myInitTab",
  1750.     "",
  1751.     "         ds      0",
  1752.     "         public  _myRomTag",
  1753.     "_myRomTag:",
  1754.     "         dc.w    RTC_MATCHWORD",
  1755.     "         dc.l    _myRomTag",
  1756.     "         dc.l    endtag",
  1757.     "         dc.b    RTF_AUTOINIT",
  1758.     "         dc.b    MYVERSION",
  1759.     "         dc.b    NT_LIBRARY",
  1760.     "         dc.b    MYPRI",
  1761.     "         dc.l    _myname",
  1762.     "         dc.l    _myid",
  1763.     "         dc.l    _myInitTab",
  1764.     "endtag:",
  1765.     "",
  1766.     "         end",
  1767.     NULL
  1768. };
  1769.  
  1770. char *mandatory[] = {
  1771.     "/* created by jim mackraz using mylib.asm by neil katin",
  1772.     " * may be used and distributed providing this comment block",
  1773.     " * is retained in the source code",
  1774.     " */",
  1775.     "#include <stdio.h>",
  1776.     "#include \"lib.h\"",
  1777.     "",
  1778.     "extern  PFL     libfunctab[];   /* my function table (libface.asm)              */",
  1779.     "extern  LONG    funkyInit();    /* hacked up version of Aztec crt0.a68  */",
  1780.     "",
  1781.     "LONG    myExpunge();",
  1782.     "",
  1783.     "struct InitTable myInitTab =  {",
  1784.     "        sizeof (struct MyBase),",
  1785.     "        libfunctab,",
  1786.     "        NULL,                                   /* will initialize my data in funkymain()       */",
  1787.     "        funkyInit",
  1788.     "};",
  1789.     "",
  1790.     "#define MYREVISION      0               /* would be nice to auto-increment this         */",
  1791.     "",
  1792.     "extern char myname[];",
  1793.     "extern char myid[];",
  1794.     "",
  1795.     "extern struct Resident  myRomTag;",
  1796.     "",
  1797.     "/*",
  1798.     " * this function is my C-language library initRoutine.  It is called",
  1799.     " * by funkyInit() after register saves and small model initialization is",
  1800.     " * done.",
  1801.     " */",
  1802.     "",
  1803.     "LONG",
  1804.     "funkymain(libbase, seglist)",
  1805.     "struct  MyBase  *libbase;",
  1806.     "ULONG                   seglist;",
  1807.     "{",
  1808.     "        register        struct MyBase *base;",
  1809.     "",
  1810.     "        /* cookie       */",
  1811.     "        base = libbase;",
  1812.     "        base->mb_Cookie = 0xDEAD1234;   /* debug kind of stuff                          */",
  1813.     "        base->mb_SegList = seglist;",
  1814.     "",
  1815.     "        /* init. library structure (since I don't do automatic data init.)      */",
  1816.     "        base->mb_Lib.lib_Node.ln_Type = NT_LIBRARY;",
  1817.     "        base->mb_Lib.lib_Node.ln_Name = (char *) myname;",
  1818.     "        base->mb_Lib.lib_Flags = LIBF_SUMUSED | LIBF_CHANGED;",
  1819.     "        base->mb_Lib.lib_Version = myRomTag.rt_Version;",
  1820.     "        base->mb_Lib.lib_Revision = MYREVISION;",
  1821.     "        base->mb_Lib.lib_IdString = (APTR) myid;",
  1822.     "",
  1823.     "        /* ----- do your own initialization here -----  */",
  1824.     "}",
  1825.     "",
  1826.     "LONG",
  1827.     "myOpen(base)    /* baseptr in A6, version in D0 */",
  1828.     "struct  MyBase *base;",
  1829.     "{",
  1830.     "        /* mark us as having another customer                                   */",
  1831.     "        base->mb_Lib.lib_OpenCnt++;",
  1832.     "",
  1833.     "        /* prevent delayed expunges (standard procedure)                */",
  1834.     "        base->mb_Lib.lib_Flags &= ~LIBF_DELEXP;",
  1835.     "",
  1836.     "        return ((LONG) base);",
  1837.     "}",
  1838.     "",
  1839.     "LONG",
  1840.     "myClose(base)",
  1841.     "struct  MyBase *base;",
  1842.     "{",
  1843.     "        LONG    retval = 0;",
  1844.     "",
  1845.     "        if ((--base->mb_Lib.lib_OpenCnt == 0) &&",
  1846.     "                        (base->mb_Lib.lib_Flags & LIBF_DELEXP))",
  1847.     "        {",
  1848.     "                /* no more people have me open,",
  1849.     "                 * and I have a delayed expunge pending",
  1850.     "                 */",
  1851.     "                retval = myExpunge(); /* return segment list    */",
  1852.     "        }",
  1853.     "",
  1854.     "        return (retval);",
  1855.     "}",
  1856.     "",
  1857.     "LONG",
  1858.     "myExpunge(base)",
  1859.     "struct  MyBase  *base;",
  1860.     "{",
  1861.     "        ULONG                   seglist = 0;",
  1862.     "        LONG                    libsize;",
  1863.     "",
  1864.     "        if (base->mb_Lib.lib_OpenCnt == 0)",
  1865.     "        {",
  1866.     "                /* really expunge: remove libbase and freemem   */",
  1867.     "",
  1868.     "                seglist = base->mb_SegList;",
  1869.     "",
  1870.     "                Remove(base);",
  1871.     "",
  1872.     "                libsize = base->mb_Lib.lib_NegSize + base->mb_Lib.lib_PosSize;",
  1873.     "                FreeMem((char *) base - base->mb_Lib.lib_NegSize, (LONG) libsize);",
  1874.     "        }",
  1875.     "        else",
  1876.     "        {",
  1877.     "                base->mb_Lib.lib_Flags &= LIBF_DELEXP;",
  1878.     "        }",
  1879.     "",
  1880.     "",
  1881.     "        /* return NULL or real seglist */",
  1882.     "        return ((LONG) seglist);",
  1883.     "}",
  1884.     "",
  1885.     NULL
  1886. };
  1887.  
  1888.  
  1889. char *faceheader[] = {
  1890.     "        include 'exec/types.i'",
  1891.     "",
  1892.     "setup   macro",
  1893.     "        movem.l d2/d3/d4-d7/a2-a6,-(sp)",
  1894.     "        jsr     _geta4",
  1895.     "        endm",
  1896.     "",
  1897.     "push    macro",
  1898.     "        move.l  \\1,-(sp)",
  1899.     "        endm",
  1900.     "",
  1901.     "fix     macro",
  1902.     "        ifc     '\\1',''",
  1903.     "                mexit",
  1904.     "        endc",
  1905.     "        ifle    \\1-8",
  1906.     "                addq.l  #\\1,sp",
  1907.     "        endc",
  1908.     "        ifgt    \\1-8",
  1909.     "                lea     \\1(sp),sp",
  1910.     "        endc",
  1911.     "        endm",
  1912.     "",
  1913.     "restore macro",
  1914.     "        fix     \\1",
  1915.     "        movem.l (sp)+,d2/d3/d4-d7/a2-a6",
  1916.     "        rts",
  1917.     "        endm",
  1918.     "",
  1919.     "        dseg",
  1920.     "",
  1921.     "        public  _libfunctab",
  1922.     "_libfunctab:",
  1923.     "        dc.l    myopen",
  1924.     "        dc.l    myclose",
  1925.     "        dc.l    myexpunge",
  1926.     "        dc.l    $0000",
  1927.     NULL
  1928. };
  1929.  
  1930. char *incbody[] = {
  1931.     "#include <exec/types.h>",
  1932.     "#include <exec/nodes.h>",
  1933.     "#include <exec/resident.h>",
  1934.     "#include <exec/libraries.h>",
  1935.     "",
  1936.     "#include <functions.h>",
  1937.     "",
  1938.     "typedef LONG (*PFL)();      /* pointer to function returning 32-bit int */",
  1939.     "",
  1940.     "/* library initialization table, used for AUTOINIT libraries                    */",
  1941.     "struct InitTable {",
  1942.     "    ULONG   it_DataSize;    /* library data space size          */",
  1943.     "    PFL     *it_FuncTable;  /* table of entry points            */",
  1944.     "    APTR    it_DataInit;    /* table of data initializers       */",
  1945.     "    PFL     it_InitFunc;    /* initialization function to run   */",
  1946.     "};",
  1947.     "",
  1948.     "struct MyBase {",
  1949.     "    struct  Library mb_Lib;",
  1950.     "    ULONG   mb_Cookie;      /* looks good                       */",
  1951.     "    ULONG   mb_SegList;",
  1952.     "    ULONG   mb_Flags;",
  1953.     "    APTR    mb_ExecBase;    /* pointer to exec base             */",
  1954.     "    APTR    mb_A4;          /* proper value of A4 for aztec small model */",
  1955.     "};",
  1956.     NULL
  1957. };
  1958.  
  1959. char *linkhead[] = {
  1960.     "        include 'exec/types.i'",
  1961.     "        include 'exec/libraries.i'",
  1962.     "",
  1963.     "        LIBINIT",
  1964.     NULL
  1965. };
  1966.  
  1967. char *link2[] = {
  1968.     "",
  1969.     "store   macro",
  1970.     "        movem.l d2-d7/a2-a5,safekeep",
  1971.     "        endm",
  1972.     "",
  1973.     "retrieve macro",
  1974.     "        movem.l safekeep,d2-d7/a2-a5",
  1975.     "        endm",
  1976.     "",
  1977.     "        dseg",
  1978.     "",
  1979.     "safekeep:",
  1980.     "        dcb.l 14     ; reserve some space for temporary register storage",
  1981.     "",
  1982.     "        cseg",
  1983.     "",
  1984.     "        ; --- xref from application",
  1985.     "        public  _libbase",
  1986.     "",
  1987.     "        ; --- xdef for application\n",
  1988.     NULL
  1989. };
  1990.  
  1991. char *face2[] = {
  1992.     "        dc.l    $ffffffff",
  1993.     "",
  1994.     "        cseg",
  1995.     "",
  1996.     "        ;--- library functions",
  1997.     "        public  _myOpen",
  1998.     "        public  _myClose",
  1999.     "        public  _myExpunge",
  2000.     NULL
  2001. };
  2002.  
  2003. SHAR_EOF
  2004. #    End of shell archive
  2005. exit 0
  2006. -- 
  2007. Bob Page, U of Lowell CS Dept.  page@swan.ulowell.edu  ulowell!page
  2008. Have five nice days.
  2009.